listen for 'error' on both plain and cleartext sockets

fork
mscdex 12 years ago
parent 2a00c83058
commit b974f4da64

@ -162,7 +162,7 @@ ImapConnection.prototype.connect = function(loginCb) {
self.emit('close', had_error); self.emit('close', had_error);
}); });
state.conn.on('error', function(err) { socket.on('error', function(err) {
clearTimeout(state.tmrConn); clearTimeout(state.tmrConn);
err.level = 'socket'; err.level = 'socket';
if (state.status === STATES.NOCONNECT) if (state.status === STATES.NOCONNECT)

Loading…
Cancel
Save