From a9e87632632099532b4398fc47310fc2e9c2350d Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 30 May 2011 11:57:22 -0400 Subject: [PATCH] Fix connection timeout --- imap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap.js b/imap.js index febe898..47392b9 100644 --- a/imap.js +++ b/imap.js @@ -95,7 +95,7 @@ ImapConnection.prototype.connect = function(loginCb) { this._state.conn = net.createConnection(this._options.port, this._options.host); - this._state.tmrConn = setTimeout(this._fnTmrConn, this._options.connTimeout, loginCb); + this._state.tmrConn = setTimeout(this._fnTmrConn.bind(this), this._options.connTimeout, loginCb); this._state.conn.setKeepAlive(true); if (this._options.secure) {