You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit tries to improve two issues
1) A free port is obtained by setting the port value as zero and the
OS will bind to a free port. We immediately close the port and then
later create another socket on the same port. The issue with the
approach is, OS could allocate the same port to another because we
have closed the port. This leads to a situation where more than one
bypass server could listen on the same port (this is possible because
of SO_REUSEPORT flag). The issue is fixed by not closing the socket.
2) Bypass exposes a down api, which closes the socket. The issue here
is the same as above, the OS is free to allocate the port to
others. The current solution tries to fix the issue by keeping track
of which test owns which ports and try not to reuse the same
ports. This is still not foolproof, there is a small interval during
which the socket is active, but better than the old logic.
0 commit comments