Skip to content

Commit 2f8efe1

Browse files
committed
revert making close_connection CS shielded, as that would be a behaviour change causing very long stalls with the default timeout of 60s
1 parent d75f118 commit 2f8efe1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

trio_websocket/_impl.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ async def open_connection(nursery: trio.Nursery) -> WebSocketConnection:
145145

146146
async def close_connection(connection: WebSocketConnection) -> None:
147147
try:
148-
with trio.fail_after(disconnect_timeout) as cs:
149-
cs.shield = True
148+
with trio.fail_after(disconnect_timeout):
150149
await connection.aclose()
151150
except trio.TooSlowError:
152151
raise DisconnectionTimeout from None

0 commit comments

Comments
 (0)