From 5fe710a589393a10047091c5d21217516da2d70f Mon Sep 17 00:00:00 2001 From: blackcat Date: Fri, 25 Oct 2024 06:15:18 +0000 Subject: [PATCH] fix: panic on terminating SCTP connection --- internal/ngap/service/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ngap/service/service.go b/internal/ngap/service/service.go index 5410105..b180ff7 100644 --- a/internal/ngap/service/service.go +++ b/internal/ngap/service/service.go @@ -118,7 +118,7 @@ func listenAndServe(localAddr, remoteAddr *sctp.SCTPAddr, errChan chan<- error) n, sctp_info, _, sctpread_err := conn.SCTPRead(data) if sctpread_err != nil { - ngapLog.Debugf("[SCTP] AMF SCTP address: %+v", conn.RemoteAddr().String()) + ngapLog.Debugf("[SCTP] AMF SCTP address: %s", remoteAddr) if sctpread_err == io.EOF || sctpread_err == io.ErrUnexpectedEOF { ngapLog.Warn("[SCTP] Close connection.") errConn := conn.Close()