Closed xrxca closed 3 years ago
I can move the connection code to shortPoll, allowing it to retry until connection is successful. This, however, delays the initial connection until the shortPoll is done, which depending on what shortPoll is set to, could be 30 seconds or more. This tends to throw people into a tizzy.
A little late, but in the latest version of MyQ v2.2.15, the initial connection is done in the first longpoll (about 60 seconds after starting nodeserver), and it will retry every longpoll (every 60 seconds) to reestablish the connection. This should fix your issue.
Finally got around to updating this node, and this does solve the issue I was having Thanks.
I'm running polyglot on an rPi that is powered through POE, the problem I'm running into is that the switch it's connected to also powers the external gateway via POE, and the gateway is horribly slow coming up, As a result after a power failure, on startup my internal nodes are all quite happy, but this one fails as soon as it can't resolve the api hostname.
I've added a hack to my copy that does a retry/delay loop with socket.gethostbyname until either the loop counter runs out or it resolves the hostname which works for me, but I'd think it should be an option to retry for x amount of time if the failure is temporary like this..