From 39b4401c52369d2d2cedcbe6547764c2c2d912a0 Mon Sep 17 00:00:00 2001 From: Nick McIntosh Date: Tue, 28 Jun 2016 21:32:08 +1000 Subject: [PATCH] Correctly update internal connection status Unless you pass a function argument to client.connect(), the internal booleans _isConnecting and _isReconnecting never get updated. The function argument is meant to be optional. --- lib/ddp-client.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ddp-client.js b/lib/ddp-client.js index 7e65c10..252ea8b 100644 --- a/lib/ddp-client.js +++ b/lib/ddp-client.js @@ -146,6 +146,8 @@ DDPClient.prototype._message = function(data) { } else if (data.msg === "connected") { self.session = data.session; + self._isConnecting = false; + self._isReconnecting = false; self.emit("connected"); // method result