修复在连接读写优化模式下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

@@ -73,6 +73,16 @@ func (this *HTTPRequest) doFastcgi() (shouldStop bool) {
}
}
// 设置为持久化连接
var requestConn = this.RawReq.Context().Value(HTTPConnContextKey)
if requestConn == nil {
return
}
requestClientConn, ok := requestConn.(ClientConnInterface)
if ok {
requestClientConn.SetIsPersistent(true)
}
// 连接池配置
poolSize := fastcgi.PoolSize
if poolSize <= 0 {