mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
POSIX Drivers: Clear disconnected status when closing
This allows us to properly re-open if we were previously disconnected.
This commit is contained in:
@@ -108,6 +108,7 @@ bool FTDI::close() {
|
|||||||
while(writeQueue.try_dequeue(flushop)) {}
|
while(writeQueue.try_dequeue(flushop)) {}
|
||||||
|
|
||||||
closing = false;
|
closing = false;
|
||||||
|
disconnected = false;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ bool STM32::close() {
|
|||||||
writeThread.join();
|
writeThread.join();
|
||||||
|
|
||||||
closing = false;
|
closing = false;
|
||||||
|
disconnected = false;
|
||||||
|
|
||||||
int ret = ::close(fd);
|
int ret = ::close(fd);
|
||||||
fd = -1;
|
fd = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user