fix: tuic server close with error message
This commit is contained in:
parent
48f50b722c
commit
89a070ea42
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ type serverHandler struct {
|
||||||
func (s *serverHandler) handle() {
|
func (s *serverHandler) handle() {
|
||||||
time.AfterFunc(s.AuthenticationTimeout, func() {
|
time.AfterFunc(s.AuthenticationTimeout, func() {
|
||||||
s.authOnce.Do(func() {
|
s.authOnce.Do(func() {
|
||||||
_ = s.quicConn.CloseWithError(AuthenticationTimeout, "")
|
_ = s.quicConn.CloseWithError(AuthenticationTimeout, "AuthenticationTimeout")
|
||||||
s.authOk = false
|
s.authOk = false
|
||||||
close(s.authCh)
|
close(s.authCh)
|
||||||
})
|
})
|
||||||
|
@ -239,7 +239,7 @@ func (s *serverHandler) handleUniStream() (err error) {
|
||||||
}
|
}
|
||||||
s.authOnce.Do(func() {
|
s.authOnce.Do(func() {
|
||||||
if !ok {
|
if !ok {
|
||||||
_ = s.quicConn.CloseWithError(AuthenticationFailed, "")
|
_ = s.quicConn.CloseWithError(AuthenticationFailed, "AuthenticationFailed")
|
||||||
}
|
}
|
||||||
s.authOk = ok
|
s.authOk = ok
|
||||||
close(s.authCh)
|
close(s.authCh)
|
||||||
|
|
Loading…
Reference in a new issue