Allow threads to reopen after closing

This commit is contained in:
Paul Hollinsky
2018-11-16 17:08:53 -05:00
parent 0cf1e7fe7f
commit 07a5dc4118
7 changed files with 14 additions and 1 deletions
+2
View File
@@ -97,6 +97,8 @@ bool FTDI::close() {
if(writeThread.joinable())
writeThread.join();
closing = false;
if(ftdiDevice.close())
return false;
+2
View File
@@ -252,6 +252,8 @@ bool STM32::close() {
if(writeThread.joinable())
writeThread.join();
closing = false;
int ret = ::close(fd);
fd = -1;