From 89a070ea42376efe91a655a60722de944b17e0c8 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 9 Mar 2023 10:41:07 +0800 Subject: [PATCH] fix: tuic server close with error message --- transport/tuic/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/tuic/server.go b/transport/tuic/server.go index e8dee8d6..fb8a30d3 100644 --- a/transport/tuic/server.go +++ b/transport/tuic/server.go @@ -89,7 +89,7 @@ type serverHandler struct { func (s *serverHandler) handle() { time.AfterFunc(s.AuthenticationTimeout, func() { s.authOnce.Do(func() { - _ = s.quicConn.CloseWithError(AuthenticationTimeout, "") + _ = s.quicConn.CloseWithError(AuthenticationTimeout, "AuthenticationTimeout") s.authOk = false close(s.authCh) }) @@ -239,7 +239,7 @@ func (s *serverHandler) handleUniStream() (err error) { } s.authOnce.Do(func() { if !ok { - _ = s.quicConn.CloseWithError(AuthenticationFailed, "") + _ = s.quicConn.CloseWithError(AuthenticationFailed, "AuthenticationFailed") } s.authOk = ok close(s.authCh)