swissmanu / harmonyhubjs-discover

A Node.JS library which lookups available Logitech Harmony hubs in the local network.
MIT License
23 stars 9 forks source link

UDP socket does not close once parent process is killed #5

Open swissmanu opened 7 years ago

swissmanu commented 7 years ago

as discovered by https://github.com/swissmanu/orchestra/issues/2, the udp socket used for the discover broadcasts is not closed properly once the parent process gets killed.

might be related to #4

swissmanu commented 7 years ago

might be fixed by #7

freaktechnik commented 6 years ago

Problem here is the UDP socket opened in https://github.com/swissmanu/harmonyhubjs-discover/blob/ba774fd1046e920d1e366e240e67d06f031df57e/lib/ping.js#L8 that is never fully closed.

freaktechnik commented 6 years ago

Doing discover.ping.socket.unref(); after stop seems to fix the issue for me.

AirBorne04 commented 6 years ago

since this repo seems to be abandoned i created an updated package which includes some of the here available pull requests, hop over to @harmonyhub and give it a try.