Allow to pass timeout to obtainNextWorkingUrl

Sometimes timeout for news in launcher, needs to be investigated
This commit is contained in:
Klaus Basan
2017-04-22 03:04:11 +02:00
committed by Mathew Sutcliffe
parent f7c4292695
commit 640ad99520
4 changed files with 7 additions and 7 deletions

View File

@@ -88,6 +88,7 @@ namespace BlackMisc
bool CNetworkUtils::canConnect(const QString &hostAddress, int port, QString &message, int timeoutMs)
{
if (timeoutMs < 0) { timeoutMs = getTimeoutMs(); } // external functions might call with -1
QTcpSocket socket;
QSignalMapper mapper;
QObject::connect(&socket, &QTcpSocket::connected, &mapper, QOverload<>::of(&QSignalMapper::map));