Skip to content

Commit

Permalink
Always try to fetch repo for mirrors (go-gitea#19975)
Browse files Browse the repository at this point in the history
- Always give a best-effort to fetching the repositories, if even that
fails indeed give a disconnected mirror found error.
- *Partially* resolves go-gitea#19928

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
2 people authored and Sysoev, Vladimir committed Aug 10, 2022
1 parent 8914564 commit b23a55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/mirror/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
var item SyncRequest
var repo *repo_model.Repository
if m, ok := bean.(*repo_model.Mirror); ok {
if m.Repo == nil {
if m.GetRepository() == nil {
log.Error("Disconnected mirror found: %d", m.ID)
return nil
}
Expand All @@ -73,7 +73,7 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
ReferenceID: m.RepoID,
}
} else if m, ok := bean.(*repo_model.PushMirror); ok {
if m.Repo == nil {
if m.GetRepository() == nil {
log.Error("Disconnected push-mirror found: %d", m.ID)
return nil
}
Expand Down

0 comments on commit b23a55f

Please sign in to comment.