Skip to content
Permalink
Browse files

call udp_tune() before bind()

This is because if you want SO_REUSEPORT you need the sockopt set first.
  • Loading branch information
pysiak committed Oct 10, 2014
1 parent 8e31542 commit a9e2157ccf73e9da46f2442ffe6d1e94dd88d01c
Showing with 2 additions and 2 deletions.
  1. +2 −2 udp_request.c
@@ -468,6 +468,8 @@ udp_listener_bind(struct context *c)
return -1;
}

udp_tune(c->udp_listener_handle);

evutil_make_socket_closeonexec(c->udp_listener_handle);
evutil_make_socket_nonblocking(c->udp_listener_handle);
if (bind
@@ -481,8 +483,6 @@ udp_listener_bind(struct context *c)
return -1;
}

udp_tune(c->udp_listener_handle);

// resolver socket
assert(c->udp_resolver_handle == -1);
if ((c->udp_resolver_handle =

0 comments on commit a9e2157

Please sign in to comment.
You can’t perform that action at this time.