mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 14:36:47 +00:00
fix: tuic server close with error message
This commit is contained in:
1 parent
0c984644b4
commit
bae61a8152
1 file changed
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user