Skip to content

Commit

Permalink
fix: panic on terminating SCTP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
blackcat-118 committed Oct 25, 2024
1 parent abfb192 commit 5fe710a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ngap/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5fe710a

Please sign in to comment.