diff --git a/common/body_tag.html b/common/body_tag.html
index bebd48b..dce75a4 100644
--- a/common/body_tag.html
+++ b/common/body_tag.html
@@ -27,10 +27,22 @@ var its = (function() {
url.protocol = url.protocol == 'https:' ? 'wss' : 'ws';
url += 'its-open-ws/';
+
+ var reconnect_delay = 1000;
+ var reconnect_giveup = 1000000;
+
function connect() {
- console.log('isitopen: reconnecting');
- var ws = new WebSocket(url);
- register(ws);
+ if(reconnect_delay > reconnect_giveup)
+ return;
+
+ setTimeout(function() {
+ console.log('isitopen: reconnecting');
+ var ws = new WebSocket(url);
+ register(ws);
+
+ }, reconnect_delay);
+
+ reconnect_delay *= 2;
}
function refresh() {