use short read timeout when waiting for first stream open. disable read timeout aftwards

This commit is contained in:
Daniel Gultsch 2018-10-04 11:20:02 +02:00
parent a34033dea3
commit 390175e5b3

View file

@ -352,7 +352,9 @@ public class XmppConnection implements Runnable {
}
}
}
localSocket.setSoTimeout(Config.SOCKET_TIMEOUT * 1000);
if (startXmpp(localSocket)) {
localSocket.setSoTimeout(0); //reset to 0; once the connection is established we dont want this
if (!result.equals(storedBackupResult)) {
mXmppConnectionService.databaseBackend.saveResolverResult(domain, result);
}