From 0c00458ac37f0e5049455c861c148fd43b5a77ac Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 29 Oct 2013 12:52:56 +0000 Subject: [PATCH] feature(socket) connect: add reconnect limit: 5 seconds --- lib/client/socket.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/client/socket.js b/lib/client/socket.js index e59a8438..600c45a2 100644 --- a/lib/client/socket.js +++ b/lib/client/socket.js @@ -16,8 +16,11 @@ var CloudCmd, Util, DOM, io; }); function connect() { + var FIVE_SECONDS = 5000; + socket = io.connect(CloudCmd.HOST, { - 'max reconnection attempts' : Math.pow(2, 32) + 'max reconnection attempts' : Math.pow(2, 32), + 'reconnection limit' : FIVE_SECONDS }); CloudCmd.Socket = socket;