Fix bug that always reopened device.

pull/42/head
weetmuts 2019-10-18 00:31:59 +02:00
rodzic 7f3166e9fe
commit df790c8335
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -152,7 +152,7 @@ void SerialDeviceTTY::close()
void SerialDeviceTTY::checkIfShouldReopen()
{
if (fd_ != -1)
if (fd_ != -1 && reopen_after_ > 0)
{
time_t curr = time(NULL);
time_t diff = curr-start_since_reopen_;