Permalink
Browse files

fix contant reconnecting bug

  • Loading branch information...
maccman committed Apr 29, 2011
1 parent 001e213 commit 4d35ca10f69c11c0b795bab235c5b9f1b39ddc01
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/juggernaut.js
View
@@ -138,10 +138,10 @@ Juggernaut.fn.onmessage = function(data){
Juggernaut.fn.reconnect = function(){
if (this.recInterval) return;
- var clear = function(){
+ var clear = this.proxy(function(){
clearInterval(this.recInterval);
this.recInterval = null;
- };
+ });
this.recInterval = setInterval(this.proxy(function(){
if (this.state == "connected") clear()

0 comments on commit 4d35ca1

Please sign in to comment.