Open christofkac opened 4 years ago
If client.end()
throws an exception, it won't get caught.
You could try this:
…
}).finally(() => {
client.end();
}).catch(e => {})
But I'm not entirely sure where the error is coming from, so there might be another cause for it.
Thanks, I'll give it a try and come back once this happens again. I added a logging into the new catch() block to get noticed.
I'm using your library successfully, really thanks for the work. I use it in an ioBroker (homeautomation server) environment which is JavaScript based.
My problem is, that from time to time I get an uncaugt exception which crashes the JavaScript engine in ioBroker. I based my code on your example:
My output:
So although the readout was successful, the exception ECONNRESET is thrown and unfortunately not caught be the "catch" statement.
Any hint? Thanks Christof