mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Allow threads to reopen after closing
This commit is contained in:
@@ -97,6 +97,8 @@ bool FTDI::close() {
|
||||
if(writeThread.joinable())
|
||||
writeThread.join();
|
||||
|
||||
closing = false;
|
||||
|
||||
if(ftdiDevice.close())
|
||||
return false;
|
||||
|
||||
|
||||
@@ -252,6 +252,8 @@ bool STM32::close() {
|
||||
if(writeThread.joinable())
|
||||
writeThread.join();
|
||||
|
||||
closing = false;
|
||||
|
||||
int ret = ::close(fd);
|
||||
fd = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user