summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-06-16 15:44:13 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-06-16 15:44:13 +0100
commit13074613c27ef4b71f89ac18ef5a35e4841421ae (patch)
treee5f372950849bacb65558dc06b99f7a407e77fbe
parentadc9d57505995de973ab45e4eef8c191f1bf9b76 (diff)
downloadtelepathy-mission-control-13074613c27ef4b71f89ac18ef5a35e4841421ae.tar.gz
Add a #define for the reconnect interval cap
-rw-r--r--src/mcd-connection.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 21251c21..0b16491e 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -75,6 +75,7 @@
#define INITIAL_RECONNECTION_TIME 10 /* seconds */
#define RECONNECTION_MULTIPLIER 3
+#define MAXIMUM_RECONNECTION_TIME 30 * 60 /* half an hour */
#define MCD_CONNECTION_PRIV(mcdconn) (MCD_CONNECTION (mcdconn)->priv)
@@ -1113,9 +1114,9 @@ mcd_connection_invalidated_cb (TpConnection *tp_conn,
(priv->reconnect_interval,
(GSourceFunc)mcd_connection_reconnect, connection);
priv->reconnect_interval *= RECONNECTION_MULTIPLIER;
- if (priv->reconnect_interval >= 30 * 60)
- /* no more than 30 minutes! */
- priv->reconnect_interval = 30 * 60;
+
+ if (priv->reconnect_interval >= MAXIMUM_RECONNECTION_TIME)
+ priv->reconnect_interval = MAXIMUM_RECONNECTION_TIME;
}
}
else