Permalink
Browse files

Close xmpp connection on logout

  • Loading branch information...
1 parent 293f7b0 commit 0627813ba8dcef804f293caf6463261df1174d3c @lloydwatkin lloydwatkin committed Feb 26, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
View
@@ -74,10 +74,10 @@ Xmpp.prototype._initialiseListeners = function() {
Xmpp.prototype.logout = function(callback) {
if (!this.client) return
- this.client.emit('end')
+ this.client.end()
delete this.client
if (callback) return callback(null, true)
- this.socket.disconnect()
+ this.socket.end()
}
Xmpp.prototype.anonymousLogin = function(data) {

0 comments on commit 0627813

Please sign in to comment.