Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Henning committed Sep 25, 2024
1 parent 100c762 commit 697d2b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions internal/sbi/processor/association.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ func (p *Processor) ToBeAssociatedWithUPF(smfPfcpContext context.Context, upf *s
}

for {
// check if SMF PFCP context (parent) was cancelled
// check if SMF PFCP context (parent) was canceled
// note: UPF AssociationContexts are children of smfPfcpContext
select {
case <-smfPfcpContext.Done():
logger.MainLog.Infoln("Cancelled SMF PFCP context")
logger.MainLog.Infoln("Canceled SMF PFCP context")
return
default:
ensureSetupPfcpAssociation(smfPfcpContext, upf, upfStr)
if smf_context.GetSelf().PfcpHeartbeatInterval == 0 {
return
}
keepHeartbeatTo(upf, upfStr)
// returns when UPF heartbeat loss is detected or association is cancelled
// returns when UPF heartbeat loss is detected or association is canceled

p.releaseAllResourcesOfUPF(upf, upfStr)
}
Expand Down Expand Up @@ -76,7 +76,7 @@ func ensureSetupPfcpAssociation(parentContext context.Context, upf *smf_context.
timer := time.After(retryInterval)
select { // no default case, either case needs to be true to continue
case <-parentContext.Done():
logger.MainLog.Infoln("Cancelled SMF PFCP context")
logger.MainLog.Infoln("Canceled SMF PFCP context")
return
case <-timer:
continue
Expand Down Expand Up @@ -128,7 +128,7 @@ func keepHeartbeatTo(upf *smf_context.UPF, upfStr string) {
timer := time.After(smf_context.GetSelf().PfcpHeartbeatInterval)
select {
case <-upf.AssociationContext.Done():
logger.MainLog.Infof("Cancelled association to UPF[%s]", upfStr)
logger.MainLog.Infof("Canceled association to UPF[%s]", upfStr)
return
case <-timer:
continue
Expand Down
5 changes: 0 additions & 5 deletions pkg/utils/pfcp_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import (
"github.com/free5gc/smf/pkg/service"
)

//var (
// pfcpStart func(a *service.SmfApp)
// pfcpStop func()
//)

func InitPFCPFunc() (func(a *service.SmfApp), func()) {
smfContext := smf_context.GetSelf()

Expand Down

0 comments on commit 697d2b3

Please sign in to comment.