Xray-core: Reduce error log usage for performance (#6796)

https://github.com/XTLS/Xray-core/pull/6796#issuecomment-5807809588
This commit is contained in:
风扇滑翔翼 authored and RPRX committed 2026-09-25 17:59:49 +00:00
1 parent a642a190ed
commit 61cad5ec8b
60 files changed
+210 -272

No files matched your search

+2 -2
View File
@@ -132,7 +132,7 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
uConn.ServerName = utlsConfig.ServerName
fingerprint := tls.GetFingerprint(config.Fingerprint)
if fingerprint == nil {
return nil, errors.New("REALITY: failed to get fingerprint").AtError()
return nil, errors.New("REALITY: failed to get fingerprint")
}
uConn.UConn = utls.UClient(c, utlsConfig, *fingerprint)
{
@@ -271,7 +271,7 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
// Do not close the connection
}()
time.Sleep(time.Duration(crypto.RandBetween(config.SpiderY[8], config.SpiderY[9])) * time.Millisecond) // return
return nil, errors.New("REALITY: processed invalid connection").AtWarning()
return nil, errors.New("REALITY: processed invalid connection")
}
return uConn, nil
}