Disable delay in QAbstractSocket::waitForConnected
Unsolved
General and Desktop
-
I need to disable connection delay in socket. Now If I enter wrong address, I should be waiting for 1 minute before error signal will emitted.
Also I'm trying make so:client_socket->connectToHost(ip, port); if (client_socket->waitForConnected(-1)) qDebug("Connected!");
but application is not responding after running.
I use OS X 10.11.1 and Qt 5.5.0 -
Hi,
The current timeout is 30 seconds. Since you are setting -1 the function will not timeout so your are blocking your application.