]> granicus.if.org Git - libevent/commitdiff
use new evutil_make_listen_socket_reuseable() in http.c
authorNick Mathewson <nickm@torproject.org>
Tue, 10 Feb 2009 19:38:14 +0000 (19:38 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 10 Feb 2009 19:38:14 +0000 (19:38 +0000)
svn:r1103

http.c

diff --git a/http.c b/http.c
index abee38e340de80c7a7fb46f8bc662b268d165fa8..5349c717efd480d002a482132a6d38769e022527 100644 (file)
--- a/http.c
+++ b/http.c
@@ -2887,10 +2887,8 @@ bind_socket_ai(struct addrinfo *ai, int reuse)
 #endif
 
         setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on));
-       if (reuse) {
-               setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
-                   (void *)&on, sizeof(on));
-       }
+       if (reuse)
+                evutil_make_listen_socket_reuseable(fd);
 
        if (ai != NULL) {
                r = bind(fd, ai->ai_addr, ai->ai_addrlen);