Skip to content

Commit

Permalink
Cancel invocation timeout timers on caller/callee disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
DZabavchik committed Sep 6, 2023
1 parent 8515d8e commit 9da5aba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crossbar/router/dealer.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def detach(self, session):
session=session._session_id,
)

if invoke.timeout_call:
invoke.timeout_call.cancel()
invoke.timeout_call = None

invokes = self._callee_to_invocations[callee]
invokes.remove(invoke)
if not invokes:
Expand Down Expand Up @@ -249,6 +253,10 @@ def detach(self, session):
if invoke.caller._transport:
invoke.caller._transport.send(reply)

if invoke.timeout_call:
invoke.timeout_call.cancel()
invoke.timeout_call = None

invokes = self._caller_to_invocations[invoke.caller]
invokes.remove(invoke)
if not invokes:
Expand Down

0 comments on commit 9da5aba

Please sign in to comment.