mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-23 18:16:50 +08:00
set splice-timeout to 24 hours
This commit is contained in:
@@ -595,10 +595,10 @@ func CopyRawConnIfExist(ctx context.Context, readerConn net.Conn, writerConn net
|
|||||||
errors.LogInfo(ctx, "CopyRawConn splice")
|
errors.LogInfo(ctx, "CopyRawConn splice")
|
||||||
statWriter, _ := writer.(*dispatcher.SizeStatWriter)
|
statWriter, _ := writer.(*dispatcher.SizeStatWriter)
|
||||||
//runtime.Gosched() // necessary
|
//runtime.Gosched() // necessary
|
||||||
time.Sleep(time.Millisecond) // without this, there will be a rare ssl error for freedom splice
|
time.Sleep(time.Millisecond) // without this, there will be a rare ssl error for freedom splice
|
||||||
timer.SetTimeoutIfNotOverridden(8 * time.Hour) // prevent leak, just in case
|
timer.SetTimeoutIfNotOverridden(24 * time.Hour) // prevent leak, just in case
|
||||||
if inTimer != nil {
|
if inTimer != nil {
|
||||||
inTimer.SetTimeoutIfNotOverridden(8 * time.Hour)
|
inTimer.SetTimeoutIfNotOverridden(24 * time.Hour)
|
||||||
}
|
}
|
||||||
w, err := tc.ReadFrom(readerConn)
|
w, err := tc.ReadFrom(readerConn)
|
||||||
if readCounter != nil {
|
if readCounter != nil {
|
||||||
|
Reference in New Issue
Block a user