Permalink
Browse files

websockets: fix end()

  • Loading branch information...
1 parent a9c9d40 commit 2cba8e8e138a84e90c67c479ffa6d24c808573f7 @astro astro committed Mar 22, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/xmpp/websockets.js
View
5 lib/xmpp/websockets.js
@@ -127,8 +127,9 @@ WSConnection.prototype.onclose = function() {
};
WSConnection.prototype.end = function() {
- if (this.socket)
- this.socket.close();
+ this.send("</stream:stream>");
+ if (this.websocket)
+ this.websocket.close();
};
WSConnection.prototype.onerror = function() {

0 comments on commit 2cba8e8

Please sign in to comment.