|
|
|
@ -123,9 +123,12 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
|
socket.setKeepAlive(true);
|
|
|
|
|
socket.setTimeout(0);
|
|
|
|
|
|
|
|
|
|
if (this._options.secure)
|
|
|
|
|
socket = tls.connect({ socket: state.conn }, onconnect);
|
|
|
|
|
else
|
|
|
|
|
if (this._options.secure) {
|
|
|
|
|
if (process.version.indexOf('v0.6.') > -1)
|
|
|
|
|
socket = tls.connect(null, { socket: state.conn }, onconnect);
|
|
|
|
|
else
|
|
|
|
|
socket = tls.connect({ socket: state.conn }, onconnect);
|
|
|
|
|
} else
|
|
|
|
|
state.conn.once('connect', onconnect);
|
|
|
|
|
|
|
|
|
|
function onconnect() {
|
|
|
|
|