diff options
Diffstat (limited to 'priv')
-rw-r--r-- | priv/bullet.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/priv/bullet.js b/priv/bullet.js index 19d294d..50686f6 100644 --- a/priv/bullet.js +++ b/priv/bullet.js @@ -45,26 +45,26 @@ @see https://bugzilla.mozilla.org/show_bug.cgi?id=662554 */ websocket: function(){ - var ret = false; + var transport = null; if (options !== undefined && options.disableWebSocket) { return false; } if (window.WebSocket){ - ret = window.WebSocket; + transport = window.WebSocket; } if (window.MozWebSocket && navigator.userAgent.indexOf("Firefox/6.0") == -1){ - ret = window.MozWebSocket; + transport = window.MozWebSocket; } - if (ret){ - return {'heart': true, 'transport': ret}; + if (transport){ + return {'heart': true, 'transport': transport}; } - return false; + return null; }, eventsource: function(){ @@ -262,6 +262,7 @@ return; } + transport = null; clearInterval(heartbeat); if (readyState == CLOSING){ |