From ef6e0dcd350db87973e0851704aa28c9fa44d7f6 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Thu, 5 Oct 2023 01:23:45 +0000 Subject: [PATCH] Make sure self.worker is not null when shutdown() is called. --- sippy/rtp_proxy_client_udp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sippy/rtp_proxy_client_udp.go b/sippy/rtp_proxy_client_udp.go index beee933..a7794ad 100644 --- a/sippy/rtp_proxy_client_udp.go +++ b/sippy/rtp_proxy_client_udp.go @@ -246,6 +246,9 @@ func (self *Rtp_proxy_client_udp) reconnect(address net.Addr, bind_address *sipp } func (self *Rtp_proxy_client_udp) shutdown() { + if self.worker == nil { + return + } self.worker.Shutdown() self.worker = nil }