From e4004ee90cf010aa3947f7871155c3a82e6ca15c Mon Sep 17 00:00:00 2001 From: Barry Carlyon Date: Sat, 16 Feb 2019 13:18:35 +0000 Subject: [PATCH] Send when connection is null fix for conn being null in the send function --- lib/irc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irc.js b/lib/irc.js index 23ccfe08..c5d9bae8 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -933,7 +933,7 @@ Client.prototype.send = function(command) { if (this.opt.debug) util.log('SEND: ' + args.join(' ')); - if (!this.conn.requestedDisconnect) { + if (this.conn && !this.conn.requestedDisconnect) { this.conn.write(args.join(' ') + '\r\n'); } };