-
Notifications
You must be signed in to change notification settings - Fork 283
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#listen() port number validation #383
Comments
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 10, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 12, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Dec 1, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Dec 11, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Dec 11, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Dec 11, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Dec 14, 2020
Fixes hyperledger-cacti#383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
that referenced
this issue
Dec 15, 2020
Fixes #383 Ensures that the when specifying port 0 the liste() method does not throw an exception since it is perfectly valid to bind to port zero in general. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Because Javascript treats the number zero (
0
) as afalsy
value, the check for truthy-ness in theServers#listen()
method does not work when one wants to specify the port as0
for the purpose of allocating a random port.To Reproduce
Servers.listen({ port: 0})
then watch it burn.Expected behavior
Does not throw in the event of port being
0
.Logs/Stack traces
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
v0.2.0
cc: @takeutak @sfuji822 @jonathan-m-hamilton
The text was updated successfully, but these errors were encountered: