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

Heartbeat doesn't work for external TCP IO

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes