Commit 90be9fc6 authored by Konstantin Shtepa's avatar Konstantin Shtepa Committed by Alex Blasche
Browse files

Fix QModbusRtuSerialMaster wouldn't close

QModbusRtuSerialMaster wouldn't close on disconnect and would never
release serial port because of patch in QTBUG-56009. Revert part of
patch 6bed30d5

 which lead to this
state.

Task-number: QTBUG-59050
Change-Id: I8b3280a2889a416aa80e7f58264b5f9696b8c8b9
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
Reviewed-by: default avatarAlex Blasche <alexander.blasche@qt.io>
Showing with 1 addition and 3 deletions
......@@ -144,10 +144,8 @@ bool QModbusRtuSerialMaster::open()
*/
void QModbusRtuSerialMaster::close()
{
if (state() == QModbusDevice::UnconnectedState ||
state() == QModbusDevice::ClosingState) {
if (state() == QModbusDevice::UnconnectedState)
return;
}
setState(QModbusDevice::ClosingState);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment