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
+3 -1
+3 -1
View File
@@ -391,7 +391,9 @@ func (repo *Repo) setupTimeout() error {
go func() {
select {
case <-repo.ctx.Done():
log.Warnf("Timeout deadline (%s) exceeded for %s", timeout.String(), repo.Name)
if repo.timeoutReached() {
log.Warnf("Timeout deadline (%s) exceeded for %s", timeout.String(), repo.Name)
}
}
}()
return nil