mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Adding timeout check in context select so we dont log erroneously
This commit is contained in:
1 parent
1a492537dd
commit
1537eeb5fa
1 file changed
+3
-1
+3
-1
@@ -391,7 +391,9 @@ func (repo *Repo) setupTimeout() error {
|
|||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
case <-repo.ctx.Done():
|
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
|
return nil
|
||||||
|
|||||||
Reference in new issue
Block a user