From a7a3c30504af6f70c3d8f2bda09b568db4f2398d Mon Sep 17 00:00:00 2001 From: Colin Pfingstl <19822061+koflin@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:37:42 +0200 Subject: [PATCH] helloquic: do not log transport error 0x00 --- _examples/helloquic/helloquic.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_examples/helloquic/helloquic.go b/_examples/helloquic/helloquic.go index d4d1f1bd..aa61ff3e 100644 --- a/_examples/helloquic/helloquic.go +++ b/_examples/helloquic/helloquic.go @@ -72,8 +72,11 @@ func runServer(listen netip.AddrPort) error { fmt.Println("New session", session.RemoteAddr()) go func() { err := workSession(session) - var errApplication *quic.ApplicationError - if err != nil && !(errors.As(err, &errApplication) && errApplication.ErrorCode == 0) { + var ( + errApplication *quic.ApplicationError + errTransport *quic.TransportError + ) + if err != nil && !(errors.As(err, &errApplication) && errApplication.ErrorCode == 0) && !(errors.As(err, &errTransport) && errTransport.ErrorCode == 0) { fmt.Println("Error in session", session.RemoteAddr(), err) } }()