Merge pull request #327 from zricethezav/bug/timeoutcancel

Adding timeout check in context select so we dont log erroneously
This commit is contained in:
Zachary Rice authored and GitHub committed 2020-01-24 18:16:59 -05:00
commit d8ddb9630a
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