From c178c2121895d87ca01b4db34373fcd4ac76fb3e Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Thu, 5 Oct 2006 16:22:42 +0000 Subject: [PATCH] Only schedule keep alive if not already there --- .../jabber/OperationSetBasicInstantMessagingJabberImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java index f3c01a822..5623a40e6 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java @@ -244,10 +244,12 @@ public void registrationStateChanged(RegistrationStateChangeEvent evt) // run keepalive thread if(keepAliveSendTask == null) + { keepAliveSendTask = new KeepAliveSendTask(); - keepAliveTimer.scheduleAtFixedRate( - keepAliveSendTask, KEEPALIVE_INTERVAL, KEEPALIVE_INTERVAL); + keepAliveTimer.scheduleAtFixedRate( + keepAliveSendTask, KEEPALIVE_INTERVAL, KEEPALIVE_INTERVAL); + } } } }