mirror of https://github.com/MagicStack/uvloop.git
Use cythonized SO_REUSEPORT rather than the unwrapped native one. (#609)
Fixes #550 Co-authored-by: Fantix King <fantix.king@gmail.com>
This commit is contained in:
parent
2d35f106d3
commit
4083a94e5c
|
@ -57,7 +57,7 @@ cdef extern from "uv.h" nogil:
|
|||
cdef int SOL_SOCKET
|
||||
cdef int SO_ERROR
|
||||
cdef int SO_REUSEADDR
|
||||
cdef int SO_REUSEPORT
|
||||
# use has_SO_REUSEPORT and SO_REUSEPORT in stdlib.pxi instead
|
||||
cdef int AF_INET
|
||||
cdef int AF_INET6
|
||||
cdef int AF_UNIX
|
||||
|
|
|
@ -1775,7 +1775,7 @@ cdef class Loop:
|
|||
if reuse_address:
|
||||
sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
|
||||
if reuse_port:
|
||||
sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1)
|
||||
sock.setsockopt(uv.SOL_SOCKET, SO_REUSEPORT, 1)
|
||||
# Disable IPv4/IPv6 dual stack support (enabled by
|
||||
# default on Linux) which makes a single socket
|
||||
# listen on both address families.
|
||||
|
|
Loading…
Reference in New Issue