Adding timeout check in context select so we dont log erroneously

This commit is contained in:
zricethezav committed 2020-01-24 18:07:16 -05:00
1 parent 1a492537dd
commit 1537eeb5fa
1 file changed
+2
+2
View File
@@ -391,8 +391,10 @@ func (repo *Repo) setupTimeout() error {
go func() { go func() {
select { select {
case <-repo.ctx.Done(): case <-repo.ctx.Done():
if repo.timeoutReached() {
log.Warnf("Timeout deadline (%s) exceeded for %s", timeout.String(), repo.Name) log.Warnf("Timeout deadline (%s) exceeded for %s", timeout.String(), repo.Name)
} }
}
}() }()
return nil return nil
} }