vshymanskyy / blynk-library-js

Blynk library for JS. Works with Browsers, Node.js, Espruino.
https://blynk.io/
MIT License
215 stars 67 forks source link

Fix duplicate reconnections in error and disconnect handlers. #53

Closed guymcswain closed 3 years ago

guymcswain commented 4 years ago

Received ETIMEDOUT from Blynk server which is later followed by end event on the socket. The blynk-library-js object starts a reconnect loop from within both the 'error' and 'end' listeners. The first loop succeeds but the second loop runs forever resulting in a repeating pattern in the log file:

Connecting to: IP port SSL authorization ... Connected