Merge a13b23e7ed247b2a07a796a4336fc1697b0ca4cb into 002831ea823edfa2ab3695b3f4fc0404979bcedf

This commit is contained in:
guangwu 2024-03-19 13:22:53 +08:00 committed by GitHub
commit ce469a2a4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ type Wrapper struct {
// underlying proxy
pxy Proxy
// if ProxyConf has healcheck config
// if ProxyConf has health check config
// monitor will watch if it is alive
monitor *health.Monitor

View File

@ -157,9 +157,9 @@ func (sv *XTCPVisitor) keepTunnelOpenWorker() {
func (sv *XTCPVisitor) handleConn(userConn net.Conn) {
xl := xlog.FromContextSafe(sv.ctx)
isConnTrasfered := false
isConnTransferred := false
defer func() {
if !isConnTrasfered {
if !isConnTransferred {
userConn.Close()
}
}()
@ -187,7 +187,7 @@ func (sv *XTCPVisitor) handleConn(userConn net.Conn) {
xl.Errorf("transfer connection to visitor %s error: %v", sv.cfg.FallbackTo, err)
return
}
isConnTrasfered = true
isConnTransferred = true
return
}