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){
if (typeof cb !== 'function') {
args.push(cb)
cb = function (err) {
if (err) {
if (!err instanceof Error) {
err = new Error(String(err))
if (err) {
if (!err instanceof Error) {
err = new Error(String(err))
}
throw err
}
throw err
}
}
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