From 62bd0179214612cbfa76a9bdccab8dd9e1964c8c Mon Sep 17 00:00:00 2001 From: Guillaume Belanger Date: Thu, 23 Nov 2023 11:53:38 -0500 Subject: [PATCH] fix: fetches nssf uri even if already cached --- consumer/sm_context.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/consumer/sm_context.go b/consumer/sm_context.go index 33dc70e9..f9db21c4 100644 --- a/consumer/sm_context.go +++ b/consumer/sm_context.go @@ -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 } }