Skip to content

Commit

Permalink
listener.go: Make sure pongData is always set to prevent crashes from…
Browse files Browse the repository at this point in the history
… early pings.
  • Loading branch information
Sandertv committed May 4, 2024
1 parent e251d9b commit cdbb9c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (l ListenConfig) Listen(address string) (*Listener, error) {
id: atomic.AddInt64(&listenerID, 1),
}
listener.h = &listenerConnectionHandler{l: listener, cookieSalt: rand.Uint32()}
listener.pongData.Store(new([]byte))
if l.ErrorLog == nil {
listener.log = slog.Default()
}
Expand Down

0 comments on commit cdbb9c4

Please sign in to comment.