From 84318676c64c17f638ca424ed7e7a8352e099e04 Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Fri, 10 Aug 2012 20:40:00 +0700 Subject: [PATCH] Fix undefined login callback call when connection timed out --- lib/imap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/imap.js b/lib/imap.js index 7b5de52..7e2dd3f 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -577,8 +577,8 @@ ImapConnection.prototype.connect = function(loginCb) { }); this._state.conn.connect(this._options.port, this._options.host); - this._state.tmrConn = setTimeout(this._fnTmrConn.bind(this), - this._options.connTimeout, loginCb); + this._state.tmrConn = setTimeout(this._fnTmrConn.bind(this, loginCb), + this._options.connTimeout); }; ImapConnection.prototype.isAuthenticated = function() {