Skip to content

Commit

Permalink
fix: fetches nssf uri even if already cached
Browse files Browse the repository at this point in the history
  • Loading branch information
gruyaume committed Nov 23, 2023
1 parent 5ce4faa commit 62bd017
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions consumer/sm_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,14 @@ func SelectSmf(

nsiInformation := ue.GetNsiInformationFromSnssai(anType, snssai)
if nsiInformation == nil {
if ue.NssfUri == "" {
// TODO: Set a timeout of NSSF Selection or will starvation here
for {
if err := SearchNssfNSSelectionInstance(ue, nrfUri, models.NfType_NSSF,
models.NfType_AMF, nil); err != nil {
ue.GmmLog.Errorf("AMF can not select an NSSF Instance by NRF[Error: %+v]", err)
time.Sleep(2 * time.Second)
} else {
break
}
// TODO: Set a timeout of NSSF Selection or will starvation here
for {
if err := SearchNssfNSSelectionInstance(ue, nrfUri, models.NfType_NSSF,
models.NfType_AMF, nil); err != nil {
ue.GmmLog.Errorf("AMF can not select an NSSF Instance by NRF[Error: %+v]", err)
time.Sleep(2 * time.Second)
} else {
break
}
}

Expand Down

0 comments on commit 62bd017

Please sign in to comment.