Skip to content

Commit

Permalink
* test/testsock.c (setup_socket): Set REUSEADDR option before binding
Browse files Browse the repository at this point in the history
socket.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@348405 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Nov 23, 2005
1 parent f875171 commit 399dfb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/testsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ static apr_socket_t *setup_socket(abts_case *tc)

rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
APR_ASSERT_SUCCESS(tc, "Problem creating socket", rv);

rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);

rv = apr_socket_bind(sock, sa);
APR_ASSERT_SUCCESS(tc, "Problem binding to port", rv);
Expand Down

0 comments on commit 399dfb8

Please sign in to comment.