Skip to content

Commit 8adaf60

Browse files
Adding start_serve_response to client_session
1 parent 86f3c76 commit 8adaf60

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/replit_river/client_session.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from aiochannel import Channel
99
from aiochannel.errors import ChannelClosed
1010
from opentelemetry.trace import Span
11+
import websockets
1112

1213
from replit_river.error_schema import (
1314
ERROR_CODE_CANCEL,
@@ -33,6 +34,12 @@
3334

3435

3536
class ClientSession(Session):
37+
async def replace_with_new_websocket(
38+
self, new_ws: websockets.WebSocketCommonProtocol
39+
) -> None:
40+
await super().replace_with_new_websocket(new_ws)
41+
await self.start_serve_responses()
42+
3643
async def send_rpc(
3744
self,
3845
service_name: str,

src/replit_river/common_session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
logger = logging.getLogger(__name__)
1313

14+
1415
class SendMessage(Protocol):
1516
async def __call__(
1617
self,

0 commit comments

Comments
 (0)