File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3737from replit_river .session import Session
3838from replit_river .transport_options import MAX_MESSAGE_BUFFER_SIZE , TransportOptions
3939
40+ STREAM_CANCEL_BIT = 0b00100 # Synonymous with the cancel bit in v2
4041STREAM_CLOSED_BIT = 0b01000 # Synonymous with the cancel bit in v2
4142
4243
@@ -207,11 +208,10 @@ async def send_rpc[R, A](
207208 async with asyncio .timeout (timeout .total_seconds ()):
208209 response = await output .get ()
209210 except asyncio .TimeoutError as e :
210- # TODO(dstewart) After protocol v2, change this to STREAM_CANCEL_BIT
211211 await self .send_message (
212212 stream_id = stream_id ,
213- control_flags = STREAM_CLOSED_BIT ,
214- payload = {"type" : "CLOSE " },
213+ control_flags = STREAM_CANCEL_BIT ,
214+ payload = {"type" : "CANCEL " },
215215 service_name = service_name ,
216216 procedure_name = procedure_name ,
217217 span = span ,
You can’t perform that action at this time.
0 commit comments