Skip to content

Commit decb65c

Browse files
committed
Workaround uvloop losing track of sockets when passing a socket to create_connection
related issue #10506
1 parent a08f49b commit decb65c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aiohttp/connector.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,9 @@ async def _wrap_create_connection(
12291229
if self._happy_eyeballs_delay is None:
12301230
# If happyeyeballs is disabled, connect in sequence
12311231
# this avoids a bug in uvloop where it can lose track
1232-
# of sockets passed between aiohappyeyeballs.start_connect
1233-
# and create_connection and try to reuse the same fd.
1232+
# of sockets passed directly to create_connection and
1233+
# try to reuse the same fd. The problem does not
1234+
# happen when passing host/port to create_connection.
12341235
# https://github.com/aio-libs/aiohttp/issues/10506
12351236
# https://github.com/MagicStack/uvloop/issues/645
12361237
first_addr_infos = addr_infos[0]

0 commit comments

Comments
 (0)