Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.1, 5.15.2, 6.2.0
-
None
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.