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

server.register callback handling does not enforce process.nextTick #3295

Closed
csrl opened this issue Aug 19, 2016 · 0 comments
Closed

server.register callback handling does not enforce process.nextTick #3295

csrl opened this issue Aug 19, 2016 · 0 comments
Assignees
Milestone

Comments

@csrl
Copy link

@csrl csrl commented Aug 19, 2016

According to the hapi style guide, a function taking a callback parameter must enforce the callback is called on process.nextTick.

However, server.register is dependent on whether or not the plugin.register handler calls its 'next' function asynchronously. Since plugin.register takes a 'next' parameter and not 'callback', it creates an inconsistent interface.

See hapijs/glue#72 and somewhat related #2516

server.register 'callback' should be changed to 'next' or it should enforce being called on process.nextTick according to the style guide.

@hueniverse hueniverse added the bug label Aug 20, 2016
@hueniverse hueniverse self-assigned this Aug 23, 2016
@hueniverse hueniverse added this to the 15.0.0 milestone Aug 23, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants