node-ntp-client icon indicating copy to clipboard operation
node-ntp-client copied to clipboard

Closing closed connection ntp-client.js:80:24

Open gfduszynski opened this issue 10 years ago • 1 comments

If connection gets closed due to external event error is experienced after attempt to send 'ntpData'.

Connection should be only closed if open :)

Details:

dgram.js:420
    throw new Error('Not running'); // error message from dgram_legacy.js
          ^
Error: Not running
    at Socket._healthCheck (dgram.js:420:11)
    at Socket.close (dgram.js:327:8)
    at /opt/cos-medico/new/node_modules/ntp-client/lib/ntp-client.js:80:24
    at dgram.js:297:21
    at asyncCallback (dns.js:68:16)
    at Object.onanswer [as oncomplete] (dns.js:124:7)

gfduszynski avatar Dec 15 '15 18:12 gfduszynski

I'm having this issue too if there are networking issues at the time I try to fetch the ntp time. It doesn't seem like the code here should throw. It should just return an error on the normal error callbacks.

jfriend00 avatar Apr 09 '16 03:04 jfriend00