[telepathy-gabble/master] Stop idle/timeout probing for proxies when we are disconnected.

Vivek Dasmohapatra vivek at collabora.co.uk
Wed Oct 14 07:32:46 PDT 2009


---
 src/bytestream-factory.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index edd94dd..4336aa4 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -305,10 +305,17 @@ socks5_proxies_timeout_cb (gpointer data)
   GabbleBytestreamFactory *self = GABBLE_BYTESTREAM_FACTORY (data);
   GabbleBytestreamFactoryPrivate *priv = GABBLE_BYTESTREAM_FACTORY_GET_PRIVATE (
       self);
+  TpBaseConnection *base = TP_BASE_CONNECTION (priv->conn);
 
   priv->socks5_proxies_timer = 0;
 
   /* query more proxies if needed */
+  if (base->status == TP_CONNECTION_STATUS_DISCONNECTED)
+    {
+      DEBUG ("we have been disconnected: don't try to find [more] proxies");
+      return FALSE;
+    }
+
   query_socks5_proxies (self);
 
   return FALSE;
-- 
1.5.6.5




More information about the telepathy-commits mailing list