Cloud-Automation / node-modbus

Modbus TCP Client/Server implementation for Node.JS
466 stars 174 forks source link

Add socket.unref() where needed? #160

Closed cwg999 closed 6 years ago

cwg999 commented 6 years ago

Wherever you socket.close() (and don't plan to open) or socket.destroy() I think you should also use socket.unref() so that the node.js process can exit cleanly.

For example, https://github.com/nodejs/node-convergence-archive/blob/e11fe0c2777561827cdb7207d46b0917ef3c42a7/test/parallel/test-net-socket-timeout-unref.js

I can create a pull request if you're interested, but you might have more expertise in working with sockets than I. -Cody

stefanpoeter commented 6 years ago

Would be great if you can create a pull request.

stefanpoeter commented 6 years ago

Anything?

cwg999 commented 6 years ago

Sorry, haven't worked on this since I saw you had a new v3