Author: rhuijben Date: Fri Sep 2 08:43:31 2016 New Revision: 1758902 URL: http://svn.apache.org/viewvc?rev=1758902&view=rev Log: On the 1.3.x branch: Apply the test server fix from r1711233, of dropping APR_SO_REUSEADDR on binding an address.
See http://stackoverflow.com/a/14388707/2094 for a great summary of how this flag behaves on different operating systems. And in our case we just want a unique port, with a mostly stable number. With this flag applied, tests running in parallel might just connect with the wrong webserver. * server/test_server.c (start_test_server): Don't set APR_SO_REUSEADDR. Modified: serf/branches/1.3.x/test/server/test_server.c Modified: serf/branches/1.3.x/test/server/test_server.c URL: http://svn.apache.org/viewvc/serf/branches/1.3.x/test/server/test_server.c?rev=1758902&r1=1758901&r2=1758902&view=diff ============================================================================== --- serf/branches/1.3.x/test/server/test_server.c (original) +++ serf/branches/1.3.x/test/server/test_server.c Fri Sep 2 08:43:31 2016 @@ -650,7 +650,6 @@ apr_status_t start_test_server(serv_ctx_ apr_socket_opt_set(serv_sock, APR_SO_NONBLOCK, 1); apr_socket_timeout_set(serv_sock, 0); - apr_socket_opt_set(serv_sock, APR_SO_REUSEADDR, 1); status = apr_socket_bind(serv_sock, servctx->serv_addr); if (status != APR_SUCCESS)