diff --git a/lib/ntp-client.js b/lib/ntp-client.js index 4b9a840..f40e848 100644 --- a/lib/ntp-client.js +++ b/lib/ntp-client.js @@ -77,7 +77,11 @@ clearTimeout(timeout); callback(err, null); errorFired = true; - client.close(); + try { + client.close(); + } catch (ex) { + console.error("Err during closing socket", ex); + } return; } diff --git a/package.json b/package.json index ce70a50..adaebcc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ntp-client", "description": "Pure Javascript implementation of the NTP Client Protocol", - "version": "0.5.3", + "version": "0.5.4", "homepage": "https://github.com/moonpyk/node-ntp-client", "author": { "name": "Clément Bourgeois",