mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
试图解决 grpc读firstpayload时提前关闭,关联#159
This commit is contained in:
18
main.go
18
main.go
@@ -687,15 +687,19 @@ func passToOutClient(iics incomingInserverConnState, isfallback bool, wlc net.Co
|
||||
if err != nil {
|
||||
|
||||
if !errors.Is(err, os.ErrDeadlineExceeded) {
|
||||
if ce := iics.CanLogErr("Failed in reading first payload, not because of timeout, will hung up"); ce != nil {
|
||||
ce.Write(
|
||||
zap.String("target", targetAddr.String()),
|
||||
zap.Error(err),
|
||||
)
|
||||
|
||||
if n <= 0 {
|
||||
if ce := iics.CanLogErr("Failed in reading first payload, not because of timeout, will hung up"); ce != nil {
|
||||
ce.Write(
|
||||
zap.String("target", targetAddr.String()),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
|
||||
wlc.Close()
|
||||
return
|
||||
}
|
||||
|
||||
wlc.Close()
|
||||
return
|
||||
} else {
|
||||
if ce := iics.CanLogWarn("Read first payload but timeout, will relay without first payload."); ce != nil {
|
||||
ce.Write(
|
||||
|
||||
Reference in New Issue
Block a user