freeport icon indicating copy to clipboard operation
freeport copied to clipboard

GetFreePort() should take IP address; using localhost is not adequate

Open rfay opened this issue 6 years ago • 2 comments

GetFreePort() assumes use of localhost, but it's not true that all interfaces on a computer will have the same binding. So the fact that something is not bound on localhost does not mean it's not bound on another interface.

rfay avatar Mar 22 '19 13:03 rfay

This is definitely a problem. As a workaround, it was sufficient to change "localhost:0" to "0.0.0.0:0" to ensure the selected port is free on all interfaces.

systemmonkey42 avatar Dec 05 '22 09:12 systemmonkey42

I see

codenoid avatar Jun 08 '24 06:06 codenoid