harmonyhubjs-discover icon indicating copy to clipboard operation
harmonyhubjs-discover copied to clipboard

UDP socket does not close once parent process is killed

Open swissmanu opened this issue 7 years ago • 4 comments

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 avatar Nov 08 '16 07:11 swissmanu

might be fixed by #7

swissmanu avatar Aug 09 '17 06:08 swissmanu

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 avatar Jun 25 '18 18:06 freaktechnik

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

freaktechnik avatar Jun 25 '18 18:06 freaktechnik

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.

AirBorne04 avatar Aug 20 '18 10:08 AirBorne04