From b4dd4a9e8aaf01554d991f7f3ac85deffc6b15f7 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 4 Oct 2018 20:12:20 +0200 Subject: use short read timeout when waiting for first stream open. disable read timeout aftwards --- src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/de') 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); } -- cgit v1.2.3