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

Don't respond to connections until listening is started #2362

Merged
merged 1 commit into from
Feb 9, 2015

Conversation

kanongil
Copy link
Contributor

This also fixes the removes connection event listeners after it stops test to do what it says.

@kanongil kanongil added test Test or coverage bug Bug or defect labels Jan 22, 2015
@hueniverse
Copy link
Contributor

What exactly is the problem it is trying to solve? Why would there be connections before the listener is active?

@hueniverse hueniverse self-assigned this Jan 22, 2015
@kanongil
Copy link
Contributor Author

The test I fixed was supposed to check that a stopped server will remove attached connection listeners. The code did not do this, so I fixed it by delaying the attaching until the server is actually listening (after someone has called start).

If you don't care about the extra listener, the test should probably be revised to check that the listener count matches after each stop() call.

@hueniverse hueniverse added this to the 8.2.0 milestone Feb 9, 2015
hueniverse pushed a commit that referenced this pull request Feb 9, 2015
Don't respond to connections until listening is started
@hueniverse hueniverse merged commit 486349d into hapijs:master Feb 9, 2015
hueniverse pushed a commit that referenced this pull request Feb 9, 2015
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect test Test or coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants