From d464c5878c90cebba8840eb7f4bcb27c8813580a Mon Sep 17 00:00:00 2001 From: Jens Jorgensen Date: Wed, 17 Jan 2024 16:26:08 -0600 Subject: [PATCH] fix Future exception never retrieved in create_connection --- uvloop/loop.pyx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx index 334d8d50..19ef238c 100644 --- a/uvloop/loop.pyx +++ b/uvloop/loop.pyx @@ -1972,7 +1972,12 @@ cdef class Loop: lai = &lai_static if len(fs): - await aio_wait(fs) + try: + await aio_wait(fs) + except asyncio.CancelledError as exc: + for fut in fs: + fut.cancel() + raise exc from None if rai is NULL: ai_remote = f1.result()