Skip to content

Commit cdbb9c4

Browse files
committed
listener.go: Make sure pongData is always set to prevent crashes from early pings.
1 parent e251d9b commit cdbb9c4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

listener.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func (l ListenConfig) Listen(address string) (*Listener, error) {
8585
id: atomic.AddInt64(&listenerID, 1),
8686
}
8787
listener.h = &listenerConnectionHandler{l: listener, cookieSalt: rand.Uint32()}
88+
listener.pongData.Store(new([]byte))
8889
if l.ErrorLog == nil {
8990
listener.log = slog.Default()
9091
}

0 commit comments

Comments
 (0)