From 7379f1fd5ee47c183c737d0249569721dd25dcdb Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 28 Jun 2024 06:24:50 -0700 Subject: [PATCH] handshake: ignore unknown QUIC events from crypto/tls (#4577) --- internal/handshake/crypto_setup.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index 20bcc474c9c..9347eef65f7 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -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 } }