Skip to content

Commit

Permalink
Bug crossbario#2096 memory leak in dealer.py
Browse files Browse the repository at this point in the history
(cherry picked from commit 2b8ae44)
  • Loading branch information
DZabavchik committed Sep 4, 2023
1 parent 0089c1e commit a5d3045
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crossbar/router/dealer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class InvocationRequest(object):
'id',
'registration',
'caller',
'caller_session_id',
'call',
'callee',
'forward_for',
Expand All @@ -53,6 +54,7 @@ def __init__(self, id, registration, caller, call, callee, forward_for, authoriz
self.id = id
self.registration = registration
self.caller = caller
self.caller_session_id = caller._session_id
self.call = call
self.callee = callee
self.forward_for = forward_for
Expand Down Expand Up @@ -1132,11 +1134,7 @@ def _remove_invoke_request(self, invocation_request):

del self._invocations[invocation_request.id]

# the session_id will be None if the caller session has
# already vanished
caller_id = invocation_request.caller._session_id
if caller_id is not None:
del self._invocations_by_call[caller_id, invocation_request.call.request]
del self._invocations_by_call[invocation_request.caller_session_id, invocation_request.call.request]

# noinspection PyUnusedLocal
def processCancel(self, session, cancel):
Expand Down

0 comments on commit a5d3045

Please sign in to comment.