mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
ci: downgrade to Ubuntu 22.04 (#1128)
This commit is contained in:
3 files changed
+11
-10
No files matched your search
@@ -386,19 +386,20 @@ func (f *Fetcher) run(index int, ctx context.Context) (err error) {
|
||||
resp *http.Response
|
||||
)
|
||||
f.redirectLock.Lock()
|
||||
if f.redirectURL != "" {
|
||||
redirectURL := f.redirectURL
|
||||
if redirectURL != "" {
|
||||
f.redirectLock.Unlock()
|
||||
}
|
||||
err = func() (err error) {
|
||||
} else {
|
||||
// Only hold the lock when we need to potentially set redirectURL
|
||||
defer func() {
|
||||
if f.redirectURL == "" {
|
||||
if err == nil {
|
||||
f.redirectURL = resp.Request.URL.String()
|
||||
}
|
||||
f.redirectLock.Unlock()
|
||||
if redirectURL == "" && err == nil {
|
||||
f.redirectURL = resp.Request.URL.String()
|
||||
}
|
||||
f.redirectLock.Unlock()
|
||||
}()
|
||||
}
|
||||
|
||||
err = func() (err error) {
|
||||
httpReq, err = f.buildRequest(ctx, f.meta.Req)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user