diff options
author | x25 <job@x25.ru> | 2014-03-12 17:20:13 +0300 |
---|---|---|
committer | x25 <job@x25.ru> | 2014-03-12 17:20:13 +0300 |
commit | 87ffc52939ac964380327ce25420770fc41bce6d (patch) | |
tree | 589fcc82aadb3249fa6703c623d1505151784e8c /flash-src/src/net/gimite | |
parent | 4405e7d5c43da109caa4be4628a9152fb99c4037 (diff) | |
download | web-socket-js-87ffc52939ac964380327ce25420770fc41bce6d.tar.gz |
fix #151
Diffstat (limited to 'flash-src/src/net/gimite')
-rw-r--r-- | flash-src/src/net/gimite/websocket/WebSocket.as | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/flash-src/src/net/gimite/websocket/WebSocket.as b/flash-src/src/net/gimite/websocket/WebSocket.as index 6ae5aba..ee04322 100644 --- a/flash-src/src/net/gimite/websocket/WebSocket.as +++ b/flash-src/src/net/gimite/websocket/WebSocket.as @@ -206,11 +206,10 @@ public class WebSocket extends EventDispatcher { readyState = CLOSED; if (fireErrorEvent) { dispatchEvent(new WebSocketEvent("error")); - } else { - var wasClean:Boolean = code != STATUS_CLOSED_ABNORMALLY && code != STATUS_CONNECTION_ERROR; - var eventCode:int = code == STATUS_CONNECTION_ERROR ? STATUS_CLOSED_ABNORMALLY : code; - dispatchCloseEvent(wasClean, eventCode, reason); } + var wasClean:Boolean = code != STATUS_CLOSED_ABNORMALLY && code != STATUS_CONNECTION_ERROR; + var eventCode:int = code == STATUS_CONNECTION_ERROR ? STATUS_CLOSED_ABNORMALLY : code; + dispatchCloseEvent(wasClean, eventCode, reason); } else { logger.log("closing"); readyState = CLOSING; |