Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge 'eelcocramer/master'

Fixes Github issue #68: Reconnection timeout is being reset in the wrong place
  • Loading branch information...
commit 6479a3570916b62adebfd9a6ef2f1534b2a2fb44 2 parents a41c729 + 255bd20
@astro astro authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/xmpp/connection.js
View
5 lib/xmpp/connection.js
@@ -53,7 +53,7 @@ Connection.prototype.allowTLS = true;
*/
Connection.prototype.setupStream = function() {
var self = this;
- this.reconnectDelay = 0;
+
this.socket.addListener('data', function(data) {
self.onData(data);
});
@@ -171,6 +171,9 @@ Connection.prototype.stopParser = function() {
};
Connection.prototype.startStream = function() {
+ /* reset reconnect delay */
+ this.reconnectDelay = 0;
+
var attrs = {};
for(var k in this.xmlns) {
if (this.xmlns.hasOwnProperty(k)) {
Please sign in to comment.
Something went wrong with that request. Please try again.