re-add node 0.6 compatibility

fork
mscdex 12 years ago
parent 034bd33cf3
commit f62659a523

@ -10,7 +10,7 @@ If you are in need of this kind of extra functionality, check out andris9's [mim
Requirements
============
* [node.js](http://nodejs.org/) -- v0.8.0 or newer
* [node.js](http://nodejs.org/) -- v0.6.0 or newer
* An IMAP server -- tested with gmail

@ -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() {

@ -3,7 +3,7 @@
"author": "Brian White <mscdex@mscdex.net>",
"description": "An IMAP module for node.js that makes communicating with IMAP servers easy",
"main": "./lib/imap",
"engines": { "node" : ">=0.8.0" },
"engines": { "node" : ">=0.6.0" },
"dependencies": {
"utf7": "1.0.0"
},

Loading…
Cancel
Save