Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: handle._handle.close(callback) is not idempotent #1287

Closed
bnoordhuis opened this issue Mar 27, 2015 · 0 comments
Closed

core: handle._handle.close(callback) is not idempotent #1287

bnoordhuis opened this issue Mar 27, 2015 · 0 comments
Labels
confirmed-bug Issues with confirmed bugs.

Comments

@bnoordhuis
Copy link
Member

handle._handle.close(callback) is not idempotent and that's because node::HandleWrap::Close() overrides the .close method with the callback. This one-liner should print 'Trace' only once:

$ iojs -e 'var t = new (process.binding("timer_wrap").Timer); t.close(console.trace); t.close()'
Trace
    at [eval]:1:78
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:410:26)
    at evalScript (node.js:475:25)
    at startup (node.js:84:9)
    at node.js:867:3
Trace
@bnoordhuis bnoordhuis added the confirmed-bug Issues with confirmed bugs. label Mar 27, 2015
petkaantonov added a commit to petkaantonov/io.js that referenced this issue Mar 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

No branches or pull requests

1 participant