Skip to content

Commit

Permalink
Fix that some UEs are not removed in RemoveAllUeInRan (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShouheiNishi authored Mar 22, 2022
1 parent 5e6d957 commit bad0033
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion context/amf_ran.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func (ran *AmfRan) NewRanUe(ranUeNgapID int64) (*RanUe, error) {
}

func (ran *AmfRan) RemoveAllUeInRan() {
for _, ranUe := range ran.RanUeList {
saveRanUeList := make([]*RanUe, len(ran.RanUeList))
copy(saveRanUeList, ran.RanUeList)
for _, ranUe := range saveRanUeList {
if err := ranUe.Remove(); err != nil {
logger.ContextLog.Errorf("Remove RanUe error: %v", err)
}
Expand Down

0 comments on commit bad0033

Please sign in to comment.