Closed jbockerstette closed 7 years ago
Thanks for the hint. I'll make an update.
Can you confirm that pull request #142 fixes this?
I verified that now I can call close multiple times without throwing a TypeError. What was happening is that when you call close, socket.end() gets called. If you call it again, then socket.end() would get called again but on the second call, socket === null and then it would throw. So yes, this is fixed.
Thanks.
If I call close more than once, it throws TypeError. I personally think it would be better to allow you to call close multiple times on the same modbus client without throwing the TypeError. This is not a show stopper for me at all. Your code is great!