summaryrefslogtreecommitdiff
path: root/web_socket.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_socket.js')
-rw-r--r--web_socket.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web_socket.js b/web_socket.js
index 6b629a6..c92676e 100644
--- a/web_socket.js
+++ b/web_socket.js
@@ -99,10 +99,10 @@
*/
WebSocket.prototype.close = function() {
if (this.__createTask) {
- clearTimeout(this.__createTask);
- this.__createTask = null;
- this.readyState = WebSocket.CLOSED;
- return;
+ clearTimeout(this.__createTask);
+ this.__createTask = null;
+ this.readyState = WebSocket.CLOSED;
+ return;
}
if (this.readyState == WebSocket.CLOSED || this.readyState == WebSocket.CLOSING) {
return;