Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Dec 2, 2017
1 parent b2a3bd0 commit ef81307
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/wrap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/wrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ function wrap (fn:Function, opts:WrapOpts) {
if (isPromise(ret)) ret = await ret
await env.finishAsyncTasks()
} catch (err) {
clearInterval(monitor)
return callback(err)
} finally {
clearInterval(monitor)
require.track = false
}

clearInterval(monitor)
debug(`finished wrapped task: ${fn.name}`)
callback(null, ret)
}
Expand Down

0 comments on commit ef81307

Please sign in to comment.