Skip to content

Commit

Permalink
Merge pull request #7 from blackcat-118/fix/terminate_panic
Browse files Browse the repository at this point in the history
fix: panic on terminating SCTP connection
  • Loading branch information
ianchen0119 authored Oct 25, 2024
2 parents abfb192 + ec1ce0e commit 890944b
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.String())
if sctpread_err == io.EOF || sctpread_err == io.ErrUnexpectedEOF {
ngapLog.Warn("[SCTP] Close connection.")
errConn := conn.Close()
Expand Down

0 comments on commit 890944b

Please sign in to comment.