[telepathy-mission-control/master] fd.o #21299: don't reconnect if disconnected with reason Name_In_Use

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jun 11 08:12:18 PDT 2009


On protocols where the new connection fails, we'd just keep retrying
until the old connection goes away (i.e. perhaps indefinitely) which is
not too bad, but a waste of bandwidth.

On protocols where the old connection drops and the new one succeeds,
we could easily get into a fight with the other client - we reconnect, the
other client gets kicked off, it reconnects, we get kicked off, we
reconnect, repeat. This is particularly harmful when our initial
reconnection timeout is only a second. If the other client is also
MC 5, we could end up with two connection attempts per second,
indefinitely.
---
 src/mcd-connection.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 94db802..398dc93 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -956,8 +956,7 @@ static void proxy_destroyed (TpConnection *tp_conn, guint domain, gint code,
     _mcd_connection_release_tp_connection (connection);
 
     if (priv->abort_reason == TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED ||
-        priv->abort_reason == TP_CONNECTION_STATUS_REASON_NETWORK_ERROR ||
-        priv->abort_reason == TP_CONNECTION_STATUS_REASON_NAME_IN_USE)
+        priv->abort_reason == TP_CONNECTION_STATUS_REASON_NETWORK_ERROR)
     {
         /* we were disconnected by a network error or by a connection manager
          * crash (in the latter case, we get NoneSpecified as a reason): don't
-- 
1.5.6.5




More information about the telepathy-commits mailing list