mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-31 02:26:36 +08:00
优化连接相关代码
This commit is contained in:
@@ -222,7 +222,11 @@ func (this *ClientConn) SetReadDeadline(t time.Time) error {
|
||||
return nil
|
||||
}
|
||||
this.readDeadlineTime = unixTime
|
||||
if -time.Since(t) < HTTPIdleTimeout-1*time.Second {
|
||||
var seconds = -time.Since(t)
|
||||
if seconds <= 0 || seconds > HTTPIdleTimeout {
|
||||
return nil
|
||||
}
|
||||
if seconds < HTTPIdleTimeout-1*time.Second {
|
||||
this.isShortReading = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user