summaryrefslogtreecommitdiff
path: root/src/mcd-connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mcd-connection.c')
-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