You can see that the gateway receives 6 bytes, then closes the gateway as it should. Next we see the queue pause, which is also expected. Then, two strange things happen. First, we see that after the queue has been paused, the gateway is still being written to, which shouldn't happen. The next strange thing is that although the reconnect attempt happens 3 seconds later, it never finishes connecting or throws an error. That's the last line in our log for that worker after it continued to run for another hour or so. I'm going to experiment with setTimeout and the timeout event on the tls socket to see if that event gets called in this case. Very strange stuff...
Edit: As you can see I added some additional logging, which you can find on my fork if it's of interest.
We're having issues with agents not reconnecting sometimes after a message error. Here are the relevant log entries:
You can see that the gateway receives 6 bytes, then closes the gateway as it should. Next we see the queue pause, which is also expected. Then, two strange things happen. First, we see that after the queue has been paused, the gateway is still being written to, which shouldn't happen. The next strange thing is that although the reconnect attempt happens 3 seconds later, it never finishes connecting or throws an error. That's the last line in our log for that worker after it continued to run for another hour or so. I'm going to experiment with
setTimeout
and thetimeout
event on thetls
socket to see if that event gets called in this case. Very strange stuff...Edit: As you can see I added some additional logging, which you can find on my fork if it's of interest.