diff options
-rw-r--r-- | priv/bullet.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/priv/bullet.js b/priv/bullet.js index 7cf10a9..88c9f89 100644 --- a/priv/bullet.js +++ b/priv/bullet.js @@ -251,11 +251,17 @@ url = newURL; }; this.send = function(data){ - return transport.send(data); + if (transport){ + return transport.send(data); + } else{ + return false; + } }; this.close = function(){ readyState = CLOSING; - transport.close(); + if (transport){ + transport.close(); + } }; }; |