summaryrefslogtreecommitdiffstats
path: root/priv
diff options
context:
space:
mode:
authorDave Peticolas <[email protected]>2013-06-19 20:00:32 -0700
committerDave Peticolas <[email protected]>2013-06-19 20:00:32 -0700
commitba9bf407fbbe500b0894b57a9749f1168e94e588 (patch)
treeb1d39b5ba350415b13b49e5b9dbd46dfb8a2eec6 /priv
parent9719950324ca06c281dfd7350cf4ca9089451cfb (diff)
downloadbullet-ba9bf407fbbe500b0894b57a9749f1168e94e588.tar.gz
bullet-ba9bf407fbbe500b0894b57a9749f1168e94e588.tar.bz2
bullet-ba9bf407fbbe500b0894b57a9749f1168e94e588.zip
Ignore close callback when closed.
This fixes a bug where closing a bullet connection in poll mode will not work.
Diffstat (limited to 'priv')
-rw-r--r--priv/bullet.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/priv/bullet.js b/priv/bullet.js
index 50686f6..7c3c977 100644
--- a/priv/bullet.js
+++ b/priv/bullet.js
@@ -257,8 +257,9 @@
};
transport.onclose = function(){
// Firefox 13.0.1 sends 2 close events.
- // Return directly if we already handled it.
- if (isClosed){
+ // Return directly if we already handled it
+ // or we are closed
+ if (isClosed || readyState == CLOSED){
return;
}