Skip to content

Commit 31e4a16

Browse files
committed
Fix Linux
1 parent 2ecaa72 commit 31e4a16

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

uvloop/dns.pyx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,9 @@ cdef __static_getaddrinfo(object host, object port,
139139
if proto not in {0, uv.IPPROTO_TCP, uv.IPPROTO_UDP}:
140140
return
141141

142-
if type == uv.SOCK_STREAM:
143-
# Linux only:
144-
# getaddrinfo() can raise when socket.type is a bit mask.
145-
# So if socket.type is a bit mask of SOCK_STREAM, and say
146-
# SOCK_NONBLOCK, we simply return None, which will trigger
147-
# a call to getaddrinfo() letting it process this request.
142+
if _is_sock_stream(type):
148143
proto = uv.IPPROTO_TCP
149-
elif type == uv.SOCK_DGRAM:
144+
elif _is_sock_dgram(type):
150145
proto = uv.IPPROTO_UDP
151146
else:
152147
return

0 commit comments

Comments
 (0)