Skip to content

Commit 1211230

Browse files
committed
Don't pop link error when usb cable is pulled
1 parent 88b8746 commit 1211230

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Comms/SerialLink.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,14 @@ void SerialWorker::_onPortErrorOccurred(QSerialPort::SerialPortError portError)
303303
case QSerialPort::NoError:
304304
qCDebug(SerialLinkLog) << "About to open port" << _port->portName();
305305
return;
306+
case QSerialPort::ResourceError:
307+
// We get this when a usb cable is unplugged
308+
// Fallthrough
306309
case QSerialPort::PermissionError:
307310
if (_serialConfig->isAutoConnect()) {
308311
return;
309312
}
310313
break;
311-
/*case QSerialPort::ResourceError:
312-
serialPort->close();
313-
break;*/
314314
default:
315315
break;
316316
}

0 commit comments

Comments
 (0)