From 3c2eaba8408bbcba8949118753d25465472058c9 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 6 Jan 2013 14:02:35 +0000 Subject: [PATCH] KeepAliveTask: Increased the initial heartbeat dealy in order to prevent a heartbeat timeout in high latency situations (mobile environments)" git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13389 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/PacketWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smack/PacketWriter.java b/source/org/jivesoftware/smack/PacketWriter.java index 82318939e..e845bdd07 100644 --- a/source/org/jivesoftware/smack/PacketWriter.java +++ b/source/org/jivesoftware/smack/PacketWriter.java @@ -277,9 +277,9 @@ class PacketWriter { public void run() { try { - // Sleep 15 seconds before sending first heartbeat. This will give time to + // Sleep a minimum of 15 seconds plus delay before sending first heartbeat. This will give time to // properly finish TLS negotiation and then start sending heartbeats. - Thread.sleep(15000); + Thread.sleep(15000 + delay); } catch (InterruptedException ie) { // Do nothing