Skip to content
Browse files

fix contant reconnecting bug

  • Loading branch information...
1 parent 001e213 commit 4d35ca10f69c11c0b795bab235c5b9f1b39ddc01 @maccman committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/juggernaut.js
View
4 public/juggernaut.js
@@ -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.
Something went wrong with that request. Please try again.