From 1be460996ccb73106fe0cc7961096570838b0136 Mon Sep 17 00:00:00 2001 From: gastg77 Date: Fri, 29 Dec 2023 18:28:31 +0100 Subject: [PATCH] Reject the error instead of nothing --- lib/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index 668fccb..d4436b5 100644 --- a/lib/client.js +++ b/lib/client.js @@ -76,8 +76,8 @@ Client.prototype.connect = function (timeout) { self.emit('close', hadError); }); - self.on('error', function () { - reject(); + self.on('error', function (err) { + reject(err); }); self.on('connect', function () {