Commit 281cd2b8 authored by Fabrice Marsaud's avatar Fabrice Marsaud

Fixed a lately introduced code mistake

parent 2d42d775
...@@ -41,11 +41,12 @@ SMB2Connection.requireConnect = function(method){ ...@@ -41,11 +41,12 @@ SMB2Connection.requireConnect = function(method){
if (typeof cb !== 'function') { if (typeof cb !== 'function') {
args.push(cb) args.push(cb)
cb = function (err) { cb = function (err) {
if (err) { if (err) {
if (!err instanceof Error) { if (!err instanceof Error) {
err = new Error(String(err)) err = new Error(String(err))
}
throw err
} }
throw err
} }
} }
cb = scheduleAutoClose(connection, cb); cb = scheduleAutoClose(connection, cb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment