diff --git a/imap.js b/imap.js index 624ef4e..f7857da 100644 --- a/imap.js +++ b/imap.js @@ -1695,7 +1695,7 @@ function pipe(pair, socket) { function onerror(e) { if (cleartext._controlReleased) - cleartext.socket.emit('error', e); + cleartext.emit('error', e); } function onclose() {