Permalink
Browse files

Ignore close callback when closed.

This fixes a bug where closing a bullet
connection in poll mode will not work.
  • Loading branch information...
1 parent 9719950 commit ba9bf407fbbe500b0894b57a9749f1168e94e588 @jdavisp3 jdavisp3 committed Jun 20, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 priv/bullet.js
View
@@ -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;
}

0 comments on commit ba9bf40

Please sign in to comment.