Skip to content

Commit

Permalink
Make WaitReady() return **before** ctx.Done()
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Dec 13, 2024
1 parent 24fe848 commit 2767b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pfcp/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ func (e *PFCPEntity) Serve(ctx context.Context, conn *PFCPConn) error {
e.closeFunc = cancel
defer e.closePfcpConn()
e.recoveryTimeStamp = ie.NewRecoveryTimeStamp(time.Now())
close(e.waitReady)
for {
select {
case <-serveCtx.Done():
// Stop signal received
close(e.waitReady)
return serveCtx.Err()
default:
buf := make([]byte, pfcputil.DEFAULT_MTU) // TODO: get MTU of interface instead of using DEFAULT_MTU
Expand Down

0 comments on commit 2767b63

Please sign in to comment.