mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-03 06:50:24 +08:00
反向代理增加是否重试50X选项,默认为启用
This commit is contained in:
@@ -374,6 +374,21 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId
|
||||
return
|
||||
}
|
||||
|
||||
// 50x
|
||||
if resp != nil &&
|
||||
resp.StatusCode >= 500 &&
|
||||
resp.StatusCode < 510 &&
|
||||
this.reverseProxy.Retry50X &&
|
||||
(originId > 0 || (lnNodeId > 0 && hasMultipleLnNodes)) &&
|
||||
!isLastRetry {
|
||||
if resp.Body != nil {
|
||||
_ = resp.Body.Close()
|
||||
}
|
||||
|
||||
shouldRetry = true
|
||||
return
|
||||
}
|
||||
|
||||
// 记录相关数据
|
||||
this.originStatus = int32(resp.StatusCode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user