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

QModbusRtuSerialMaster never close on disconnect

    XMLWordPrintable

Details

    Description

      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);
      // ...
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes