apache /
serf /
1eff2b05406d2b1b5e5c22f964e63807d9ae8d92 On the '1.3.x' branch: When starting the test server, retry upon receiving
a EADDRINUSE.
Some of the tests, such as the ones testing the SSL tunnels, can leave the
source port we use for tests blocked due to a TIME_WAIT:
tcp 0 0 localhost:12345 localhost:37920 TIME_WAIT
Trying to bind a socket in such a state will result in EADDRINUSE.
On trunk, this issue is solved by making the test server try other ports
starting from the current one. But we cannot really do that on the 1.3.x
branch, as that would require altering most of the tests that currently
hardcode the port number. And we also cannot use APR_SO_REUSEADDR
due to the problems listed in r1711233.
So we use a retry loop, making some of the test runs longer -- but also
solving the issue without having to change the tests on the stable branch.
See r1758902, r1711233 and an example of a failed test run [1] for details.
[1] https://github.com/apache/serf/actions/runs/4753565147/jobs/8445297350
* test/server/test_server.c
(start_test_server): Retry upon receiving a EADDRINUSE when binding the socket.
git-svn-id: https://svn.apache.org/repos/asf/serf/branches/1.3.x@1909311 13f79535-47bb-0310-9956-ffa450edef68
1 file changed