aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-04 20:12:20 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-04 20:12:20 +0200
commitb4dd4a9e8aaf01554d991f7f3ac85deffc6b15f7 (patch)
tree56386341e88a8ff3d0875a8c0ef817102d60479c
parentacf24344a00ac225f1dab5bce001f4fe1ea84b09 (diff)
use short read timeout when waiting for first stream open. disable read timeout aftwards
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 57daed31f..f21e3f47d 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -377,8 +377,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 don’t want this
if (!result.equals(storedBackupResult)) {
mXmppConnectionService.databaseBackend.saveResolverResult(domain, result);
}