Permalink
Browse files

When client handshake fails, close with the right code and reason.

  • Loading branch information...
1 parent 1ba9b85 commit 9c1e260784bed264ae473bf56896b05f2316c4ef @jcoglan jcoglan committed Dec 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/faye/websocket/client.js
@@ -61,7 +61,7 @@ Client.prototype._onData = function(data) {
} else {
this.readyState = API.CLOSED;
- var event = new API.Event('close');
+ var event = new API.Event('close', {code: 1006, reason: ''});
event.initEvent('close', false, false);
this.dispatchEvent(event);
}

0 comments on commit 9c1e260

Please sign in to comment.