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

fix(common): servers#startOnPreferredPort no graceful fallback #683 #700

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

petermetz
Copy link
Contributor

@petermetz petermetz commented Mar 22, 2021

Dependencies

Depends on #656

Commit to be reviewed

fix(common): servers#startOnPreferredPort no graceful fallback #683

The code of the method was not waiting for a promise to resolve
which was masking the underlying exception that the code
was supposed to catch and examine in order to determine if
it should perform a fallback of binding to port zero or not.
Fixed it by making sure the initial try of the preferred port
allocation is awaited for so that the exception is thrown
where it is expected by the algorithm.

Fixes #683

Signed-off-by: Peter Somogyvari [email protected]

@petermetz petermetz added the bug Something isn't working label Mar 22, 2021
takeutak
takeutak previously approved these changes Mar 23, 2021
@kikoncuo kikoncuo self-requested a review March 23, 2021 16:01
kikoncuo
kikoncuo previously approved these changes Mar 23, 2021
@petermetz petermetz dismissed stale reviews from kikoncuo and takeutak via 38fafbd March 23, 2021 16:05
@petermetz petermetz force-pushed the fix-683 branch 2 times, most recently from 38fafbd to 1ebfd32 Compare March 24, 2021 01:49
@petermetz petermetz requested review from kikoncuo and takeutak March 24, 2021 01:56
@github-actions
Copy link

🎉 Great news! Looks like all the dependencies have been resolved:

💡 To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

…edger-cacti#683

The code of the method was not waiting for a promise to resolve
which was masking the underlying exception that the code
was supposed to catch and examine in order to determine if
it should perform a fallback of binding to port zero or not.
Fixed it by making sure the initial try of the preferred port
allocation is awaited for so that the exception is thrown
where it is expected by the algorithm.

Fixes hyperledger-cacti#683

Signed-off-by: Peter Somogyvari <[email protected]>
Copy link
Contributor

@jonathan-m-hamilton jonathan-m-hamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petermetz petermetz merged commit 18f5af7 into hyperledger-cacti:main Mar 26, 2021
@petermetz petermetz deleted the fix-683 branch March 26, 2021 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(common): Servers.startOnPreferredPort crashes when preferred port is taken
4 participants