Skip to content

Commit 4083a94

Browse files
ptribblefantix
andauthored
Use cythonized SO_REUSEPORT rather than the unwrapped native one. (#609)
Fixes #550 Co-authored-by: Fantix King <[email protected]>
1 parent 2d35f10 commit 4083a94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

uvloop/includes/uv.pxd

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ cdef extern from "uv.h" nogil:
5757
cdef int SOL_SOCKET
5858
cdef int SO_ERROR
5959
cdef int SO_REUSEADDR
60-
cdef int SO_REUSEPORT
60+
# use has_SO_REUSEPORT and SO_REUSEPORT in stdlib.pxi instead
6161
cdef int AF_INET
6262
cdef int AF_INET6
6363
cdef int AF_UNIX

uvloop/loop.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ cdef class Loop:
17751775
if reuse_address:
17761776
sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEADDR, 1)
17771777
if reuse_port:
1778-
sock.setsockopt(uv.SOL_SOCKET, uv.SO_REUSEPORT, 1)
1778+
sock.setsockopt(uv.SOL_SOCKET, SO_REUSEPORT, 1)
17791779
# Disable IPv4/IPv6 dual stack support (enabled by
17801780
# default on Linux) which makes a single socket
17811781
# listen on both address families.

0 commit comments

Comments
 (0)