From 6532b25ca9bf881be3a5c72f1c807bf5c24d3e89 Mon Sep 17 00:00:00 2001 From: mscdex Date: Mon, 25 Feb 2013 06:45:36 -0500 Subject: [PATCH] don't write to a dead connection --- lib/imap.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/imap.js b/lib/imap.js index b68669c..768d34b 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -1504,6 +1504,9 @@ ImapConnection.prototype._noop = function() { }; ImapConnection.prototype._send = function(cmdstr, cb, bypass) { + if (!this._state.conn.writable) + return; + if (cmdstr !== undefined && !bypass) { this._state.requests.push({ cmd: cmdstr.match(RE_CMD)[1],