mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-29 11:40:24 +08:00
优化代码
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (this *HTTPRequest) doOSSOrigin(origin *serverconfigs.OriginConfig) (*http.Response, error) {
|
||||
func (this *HTTPRequest) doOSSOrigin(origin *serverconfigs.OriginConfig) (resp *http.Response, goNext bool, err error) {
|
||||
// stub
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
@@ -271,8 +271,9 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId
|
||||
// 开始请求
|
||||
resp, requestErr = client.Do(this.RawReq)
|
||||
} else if origin.OSS != nil { // OSS源站
|
||||
resp, requestErr = this.doOSSOrigin(origin)
|
||||
if requestErr == nil && resp == nil {
|
||||
var goNext bool
|
||||
resp, goNext, requestErr = this.doOSSOrigin(origin)
|
||||
if (requestErr == nil && resp == nil) || !goNext {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user