Comparing version 0.3.1 to 0.3.2
@@ -0,1 +1,4 @@ | ||
0.3.2 - 2013-04-08 | ||
- fixed bug where client would reconnect when closing (@tarangp) | ||
0.3.1 - 2013-04-06 | ||
@@ -2,0 +5,0 @@ - added a failed message to the connect callback if version negotiation fails. |
@@ -61,3 +61,3 @@ var WebSocket = require('ws'), | ||
self.emit('socket-close', code, message); | ||
if (self.auto_reconnect && ! self._connectionFailed) { | ||
if (self.auto_reconnect && ! self._connectionFailed && ! self._isClosing) { | ||
setTimeout(function() { self.connect(); }, self.auto_reconnect_timer); | ||
@@ -201,2 +201,3 @@ } | ||
self._connectionFailed = false; | ||
self._isClosing = false; | ||
@@ -219,3 +220,3 @@ if (connected) { | ||
var self = this; | ||
self._isClosing = true; | ||
self.socket.close(); | ||
@@ -222,0 +223,0 @@ }; |
{ | ||
"name": "ddp", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Node.js module to connect to servers using DDP protocol.", | ||
@@ -5,0 +5,0 @@ "author": "Tom Coleman <tom@thesnail.org> (http://tom.thesnail.org), Mike Bannister <notimpossiblemike@gmail.com> (http://po.ssibiliti.es)", |
10508
235