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 16:15:07 +0100
commitb84bb07cc573169028224c3d9958750f20acfa73 (patch)
tree460bda33abc98c5ad6773667bed82e3902a6c4e4
parent0884d14b2be3dc6b2c992bd63bdfd76c3d6fcca1 (diff)
downloadtelepathy-mission-control-b84bb07cc573169028224c3d9958750f20acfa73.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 14d0f0e6..5cd472bb 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -77,6 +77,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)
@@ -1117,9 +1118,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