From 9c3ce23f920e2cbecc965e943c32c2267e760bc7 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Fri, 25 Oct 2024 20:40:45 -0700 Subject: [PATCH] Don't go from Idle(UAC) straight to the Dead state. The problem with that, is Dead's OnActivate() cleans up all callback pointers, thus making a subsequent self.ua.DiscCb() effectively a NOP. --- sippy/uac_state_idle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sippy/uac_state_idle.go b/sippy/uac_state_idle.go index ce0aa65..a42d4e4 100644 --- a/sippy/uac_state_idle.go +++ b/sippy/uac_state_idle.go @@ -160,7 +160,7 @@ func (self *UacStateIdle) RecvEvent(_event sippy_types.CCEvent) (sippy_types.UaS disconnect_ts, _ := sippy_time.NewMonoTime() self.ua.SetDisconnectTs(disconnect_ts) } - return NewUaStateDead(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil + return NewUaStateDisconnected(self.ua, self.config), func() { self.ua.DiscCb(_event.GetRtime(), _event.GetOrigin(), 0, nil) }, nil } func (self *UacStateIdle) ID() sippy_types.UaStateID {