Merge a13b23e7ed247b2a07a796a4336fc1697b0ca4cb into e52727e01c11cebdd08eb7e2f6a4509874e6ad13

This commit is contained in:
guangwu 2024-04-10 16:51:55 +08:00 committed by GitHub
commit 9ce592ace3
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
}