Preventing socket.io buildups.

This commit is contained in:
Samuel Clay 2013-03-17 14:27:58 -07:00
parent 80cc1ef6fb
commit faa57db7c9
2 changed files with 3 additions and 2 deletions

View file

@ -57,7 +57,7 @@ frontend public
backend node
balance roundrobin
server node10 198.211.109.197:8888 check inter 2000ms weight 0
# server node10 198.211.109.197:8888 check inter 2000ms weight 0
server node11 198.211.110.131:8888 check inter 2000ms
server node12 198.211.110.230:8888 check inter 2000ms
server node13 192.34.61.227:8888 check inter 2000ms

View file

@ -3962,7 +3962,8 @@
}
this.counts.socket_reconnects += .5;
_.delay(_.bind(function() {
clearTimeout(this.cache.socketio_reconnect);
this.cache.socketio_reconnect = _.delay(_.bind(function() {
this.socket.socket.connect();
}, this), this.counts.socket_reconnects * 1000);
},