mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-13 02:56:24 +05:00
Added continue in case of nil connection while disconnecting
This commit is contained in:
@@ -91,6 +91,9 @@ func (self *KamailioAgent) Connect() (err error) {
|
||||
|
||||
func (self *KamailioAgent) Shutdown() (err error) {
|
||||
for conIndx, conn := range self.conns {
|
||||
if conn == nil {
|
||||
continue
|
||||
}
|
||||
if err = conn.Disconnect(); err != nil {
|
||||
utils.Logger.Err(fmt.Sprintf("<%s> can't disconnect connection at index %v because: %s",
|
||||
utils.KamailioAgent, conIndx, err))
|
||||
|
||||
Reference in New Issue
Block a user