Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59050

QModbusRtuSerialMaster never close on disconnect

XMLWordPrintable

      Because of fix of QTBUG-56009 there arisen bug when on disconnecting QModbusRtuSerialMaster would never close and would always be in QModbusDevice::ClosingState.
      Source code to illustrate:

      qmodbusdevice.cpp
      void QModbusDevice::disconnectDevice()
      {
          setState(QModbusDevice::ClosingState);
       
          //Unconnected is set by backend -> might be delayed by event loop
          close();
      }
      
      qmodbusrtuserialmaster.cpp
      void QModbusRtuSerialMaster::close()
      {
          if (state() == QModbusDevice::UnconnectedState ||
              state() == QModbusDevice::ClosingState) {
              return;
          }
       
          setState(QModbusDevice::ClosingState);
      // ...
      }
      

        For Gerrit Dashboard: QTBUG-59050
        # Subject Branch Project Status CR V

            michaelwinkelmann Michael Winkelmann
            konstantin_shtepa Konstantin Shtepa
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes