Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/smf/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *SMF) CreateSmContext(ctx context.Context, supi etsi.SUPI, pduSessionID
}
}
smContext.Mutex.Unlock()
s.RemoveSession(ctx, smContext.CanonicalName())
s.removeSessionUnlocked(ctx, smContext.CanonicalName())
}
}()

Expand Down
10 changes: 5 additions & 5 deletions internal/smf/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ func (s *SMF) ReleaseSmContext(ctx context.Context, smContextRef string) error {
if err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, "failed to release tunnel")
s.removeSessionUnlocked(ctx, smContextRef)

return fmt.Errorf("release tunnel failed: %v", err)
}

s.removeSessionUnlocked(ctx, smContextRef)
// Remove from pool under lock after all network I/O is complete.
s.mu.Lock()
delete(s.pool, smContextRef)
s.mu.Unlock()

return nil
return err
}

// releaseTunnel deactivates the GTP data path and sends a PFCP deletion request.
Expand Down
Loading