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'); } };