File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -286,8 +286,8 @@ def close(self):
286286
287287 # Put None in request queue to signal termination.
288288 self ._request_queue .put (None )
289- self ._initial_request = None
290289 self ._request_generator = None
290+ self ._initial_request = None
291291 self ._callbacks = []
292292 # Don't set self.call to None. Keep it around so that send/recv can
293293 # raise the error.
Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ async def close(self) -> None:
203203 # Put None in request queue to signal termination.
204204 await self ._request_queue .put (None )
205205 self ._request_generator = None
206+ self ._initial_request = None
206207 self ._callbacks = []
207208 # Don't set self.call to None. Keep it around so that send/recv can
208209 # raise the error.
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ def test_close_with_no_rpc(self):
311311 assert bidi_rpc .pending_requests == 1
312312 assert bidi_rpc ._request_queue .get () is None
313313 # ensure request and callbacks are cleaned up
314+ assert bidi_rpc ._initial_request is None
314315 assert not bidi_rpc ._callbacks
315316
316317 def test_send (self ):
You can’t perform that action at this time.
0 commit comments