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
+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
} }