Permalink
Browse files

pass at least the response code to callbacks on error

  • Loading branch information...
1 parent f3a9481 commit ed1070bab922752ffe2476920df1c23f8dd5296d @mscdex committed Dec 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ftp.js
View
2 lib/ftp.js
@@ -250,7 +250,7 @@ FTP.prototype.connect = function(options) {
self._buffer = self._buffer.replace(reRmLeadCode, '$1').trim();
if (retval === RETVAL.ERR_TEMP || retval === RETVAL.ERR_PERM)
- self._curReq.cb(makeError(self._buffer, code));
+ self._curReq.cb(makeError(self._buffer, code), undefined, code);
else
self._curReq.cb(undefined, self._buffer, code);
self._buffer = '';

0 comments on commit ed1070b

Please sign in to comment.