Skip to content

Commit 2617a0b

Browse files
Force close_session on ConnectionClosedOK
1 parent bf02c02 commit 2617a0b

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
@@ -1274,6 +1274,9 @@ async def _recv_from_ws(
12741274
# is no @overrides in `websockets` to hint this.
12751275
try:
12761276
message = await ws.recv(decode=False)
1277+
except ConnectionClosedOK as e:
1278+
close_session(e)
1279+
continue
12771280
except ConnectionClosed:
12781281
# This triggers a break in the inner loop so we can get back to
12791282
# the outer loop.

0 commit comments

Comments
 (0)