Merge a13b23e7ed247b2a07a796a4336fc1697b0ca4cb into acf33db4e4b6c9cf9182d93280299010637b6324

This commit is contained in:
guangwu 2024-03-15 12:52:42 +01:00 committed by GitHub
commit 7a86364fe7
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
}