Skip to content

Commit

Permalink
Prevent leak of credit timer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andriy Pylypenko authored and sobomax committed Jan 16, 2025
1 parent d6d10e4 commit 07d3358
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sippy/UaStateConnected.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def recvACK(self, req):
if self.ua.expire_timer != None:
self.ua.expire_timer.cancel()
self.ua.expire_timer = None
self.ua.cancelCreditTimer() # prevent timer leak on body-less re-INVITE
self.ua.startCreditTimer(req.rtime)
self.ua.connect_ts = req.rtime
for callback in self.ua.conn_cbs:
Expand Down Expand Up @@ -228,6 +229,7 @@ def recvEvent(self, event):
if body is not None and self.ua.on_local_sdp_change != None and body.needs_update:
self.ua.on_local_sdp_change(body, partial(self.ua.delayed_local_sdp_update, event))
return None
self.ua.cancelCreditTimer() # prevent timer leak on body-less re-INVITE
self.ua.startCreditTimer(event.rtime)
self.ua.connect_ts = event.rtime
self.ua.lSDP = body
Expand Down

0 comments on commit 07d3358

Please sign in to comment.