gosip icon indicating copy to clipboard operation
gosip copied to clipboard

Goroutine leaks with CANCEL

Open vicvon opened this issue 2 years ago • 1 comments

There is a problem with the UAS state machine,while a CANCEL request send by UAC for pending INVITE, the goroutine leaks. 微信截图_20220801164927

vicvon avatar Aug 01 '22 08:08 vicvon

Hello @vicvon , can you clarify a bit? do you respond with 487 code on server INVITE tx?

Take a note that: UAS state machine doesn't stop the tx itself, instead when UAS got a CANCEL it passes it up to application via channel returned by tx.Cancels(). So the app on CANCEL should answer 200 OK and also send 487 on the cancelling INVITE. Sending final 487 response on server INVITE tx will move it into completed state, where UAS waits ACK from UAC and stop tx or timer_H trigger and stop tx. So there is possible leak cause you forget respond with final response on transaction or it waits some time for ACK from UAC.

ghettovoice avatar Aug 16 '22 12:08 ghettovoice

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 09 '22 12:10 github-actions[bot]