Merge a13b23e7ed247b2a07a796a4336fc1697b0ca4cb into b36f3834eb5cefbd25c85777df9b362ddc6c2820

This commit is contained in:
guangwu 2024-03-20 16:33:29 +08:00 committed by GitHub
commit 88a896c823
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 // underlying proxy
pxy Proxy pxy Proxy
// if ProxyConf has healcheck config // if ProxyConf has health check config
// monitor will watch if it is alive // monitor will watch if it is alive
monitor *health.Monitor monitor *health.Monitor

View File

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