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

Heartbeat doesn't work for external TCP IO

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15.1, 5.15.2, 6.2.0, 6.6
    • Remote Objects
    • None
    • All

      RemoteObjects heartbeat doesn't work when using my own TCP connection.

       

      To demostrate the issue, I took simpleswitch registryconnected server/client example and modified it to work over LAN. When using internal RemoteObject TCP connection, all works perfectly and replica changes its state to Suspect as it should.

      Then I modified it as per documentation to use external IO:

      https://doc.qt.io/qt-5/qtremoteobjects-external-schemas.html

      This version can no longer detect lost connection using heartbeat and Replica stays in Valid state even when I completely disconnect network.

       

      I have attached both projects. To replicate the issue, it should be sufficient to change IP addresses and run registryconnectedclient and registryconnectedserver on different computers. Then simply disconnect one of the computers from network.

       

      Note: Qt RemoteObject nodes (nor Replica) also doesn't seem to get notified about socket errors from external IO - when I set small TCP_USER_TIMEOUT, Replica still thinks it's valid despite socket being closed and emitting error. I turned on remoteobject debug output and when using internal TCP, it writes out socket errors. When using external TCP socket, it didn't write out anything.

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

            bstottle Brett Stottlemyer
            arakan94 David Novák
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes