Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.5, 6.2.2
-
None
-
Ubuntu 20.04
Description
Hi,
With a .rep file like this:
class RemoteBugTest
{
SIGNAL(testSignal())
SLOT(bool testSlot())
}
If on the client side (replica), we connect the signal to the slot
// code placeholder QObject::connect(&replica, &RemoteBugTest::testSignal, [this]{ auto reply = replica.testSlot(); if(reply.waitForFinished(5000)) { qDebug() << "got response" << reply.returnValue(); } else { qDebug() << "timeout"; } });
The waitForFinished always end in timeout.
If we go with a QRemoteObjectPendingCallWatcher to do that asynchronously, it works as expected.
I guess it's related to the signal "connection" still open while we do the second call or something related to the eventLoop but was not expecting this behavior.
I attached a small project that show the bug. launch it without argument for the server, with -c for the client (triggering timeouts) and with -c -a for the asynch client (working)
Is there something that I'm doing wrong or is it a proper bug?