From ba9bf407fbbe500b0894b57a9749f1168e94e588 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Wed, 19 Jun 2013 20:00:32 -0700 Subject: Ignore close callback when closed. This fixes a bug where closing a bullet connection in poll mode will not work. --- priv/bullet.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'priv/bullet.js') 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; } -- cgit v1.2.3