Skip to content

Commit

Permalink
panic if ConnContext returns nil
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed May 27, 2024
1 parent 8b315ef commit 3df5170
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ func (s *baseServer) handleInitialImpl(p receivedPacket, hdr *wire.Header) error
var ctx context.Context
if s.connContext != nil {
ctx = s.connContext()
if ctx == nil {
panic("quic: ConnContext returned nil")
}
} else {
ctx = context.Background()
}
Expand Down

0 comments on commit 3df5170

Please sign in to comment.