Skip to content

Commit be693ac

Browse files
Force close_session on ConnectionClosedOK
1 parent 810ed9f commit be693ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/replit_river/v2/session.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,9 @@ async def _recv_from_ws(
12701270
# is no @overrides in `websockets` to hint this.
12711271
try:
12721272
message = await ws.recv(decode=False)
1273+
except ConnectionClosedOK as e:
1274+
close_session(e)
1275+
continue
12731276
except ConnectionClosed:
12741277
# This triggers a break in the inner loop so we can get back to
12751278
# the outer loop.

0 commit comments

Comments
 (0)