修复在连接读写优化模式下fastcgi无法正常工作的Bug

This commit is contained in:
GoEdgeLab
2023-03-06 10:33:54 +08:00
parent 39e020fe6b
commit 2ba63a85c1
6 changed files with 21 additions and 11 deletions

View File

@@ -105,7 +105,7 @@ func (this *ClientConn) Read(b []byte) (n int, err error) {
}
// 设置读超时时间
if this.isHTTP && !this.isWebsocket && !this.isShortReading && this.autoReadTimeout {
if this.isHTTP && !this.isPersistent && !this.isShortReading && this.autoReadTimeout {
this.setHTTPReadTimeout()
}
@@ -172,7 +172,7 @@ func (this *ClientConn) Write(b []byte) (n int, err error) {
}
// 延长读超时时间
if this.isHTTP && !this.isWebsocket && this.autoReadTimeout {
if this.isHTTP && !this.isPersistent && this.autoReadTimeout {
this.setHTTPReadTimeout()
}
@@ -238,7 +238,7 @@ func (this *ClientConn) SetDeadline(t time.Time) error {
func (this *ClientConn) SetReadDeadline(t time.Time) error {
// 如果开启了HTTP自动读超时选项则自动控制超时时间
if this.isHTTP && !this.isWebsocket && this.autoReadTimeout {
if this.isHTTP && !this.isPersistent && this.autoReadTimeout {
this.isShortReading = false
var unixTime = t.Unix()