-
Notifications
You must be signed in to change notification settings - Fork 287
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 crashes when preferred port is taken #683
Labels
bug
Something isn't working
Comments
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 22, 2021
…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]>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 23, 2021
…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]>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 24, 2021
…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]>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 24, 2021
…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]>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 26, 2021
…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]>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Mar 26, 2021
…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]>
petermetz
added a commit
that referenced
this issue
Mar 26, 2021
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]>
jordigiam
pushed a commit
to kikoncuo/cactus
that referenced
this issue
Apr 8, 2021
…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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Servers.startOnPreferredPort()
crashes when preferred port is takenTo Reproduce
3000
Servers.startOnPreferredPort(3000)
expecting it to find a new port automaticallyExpected behavior
It should return successfully with a random port allocation as the final resort fallback instead of crashing. That's the whole point of this particular implementation as used by the test at
packages/cactus-test-api-client/src/test/typescript/integration/api-client-routing-node-to-node.test.ts
Logs/Stack traces
Screenshots
N/A
Cloud provider or hardware configuration:
Dev machine
Operating system name, version, build:
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
main
@ e225b31Hyperledger Cactus Plugins/Connectors Used
Quorum
Additional context
N/A
cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo @jagpreetsinghsasan
The text was updated successfully, but these errors were encountered: