From 74e02fa54c621284ecace46385f2e876cbf66190 Mon Sep 17 00:00:00 2001 From: Brian Deitte Date: Mon, 20 Jun 2022 14:35:55 -0500 Subject: [PATCH] Fix spelling and add in callback usage --- lib/statsd.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/statsd.js b/lib/statsd.js index 41b5b6e..455e16c 100644 --- a/lib/statsd.js +++ b/lib/statsd.js @@ -426,8 +426,11 @@ Client.prototype.close = function (callback) { * Really close the socket and handle any errors related to it */ Client.prototype._close = function (callback) { - // If there was an error creating it, nothign to do here + // If there was an error creating it, nothing to do here if (! this.socket) { + if (callback) { + callback(); + } return; }