handshake: ignore unknown QUIC events from crypto/tls (#4577)

This commit is contained in:
Marten Seemann
2024-06-28 06:24:50 -07:00
committed by GitHub
parent 8f1110450b
commit 7379f1fd5e

View File

@@ -253,7 +253,10 @@ func (h *cryptoSetup) handleEvent(ev tls.QUICEvent) (done bool, err error) {
h.handshakeComplete()
return false, nil
default:
return false, fmt.Errorf("unexpected event: %d", ev.Kind)
// Unknown events should be ignored.
// crypto/tls will ensure that this is safe to do.
// See the discussion following https://github.com/golang/go/issues/68124#issuecomment-2187042510 for details.
return false, nil
}
}