Skip to content

Commit 9680834

Browse files
committed
windows fix - non-blocking connect
1 parent 3726bfb commit 9680834

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

uhttp/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,11 +1025,14 @@ def wait(self, timeout=None):
10251025

10261026
# SSL may have buffered data that select() can't see
10271027
select_timeout = 0 if self._has_ssl_pending() else remaining
1028-
r, w, _ = _select.select(
1028+
r, w, x = _select.select(
10291029
self.read_sockets,
10301030
self.write_sockets,
1031-
[], select_timeout
1031+
self.write_sockets, select_timeout
10321032
)
1033+
# Windows signals connect errors via except set
1034+
if x:
1035+
w = list(set(w) | set(x))
10331036

10341037
# Always call process_events to check request timeout
10351038
response = self.process_events(r, w)

0 commit comments

Comments
 (0)