cmd/wrapper_coverage: prevent non-needed REST requests via context timeout (#1154)

* wrapper_coverage/exchanges: cancel context to not send rest requests/ populate context through functions that do rest requests

* linter: fix

* exchange_template: fix test

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2023-04-02 11:20:25 +10:00
committed by GitHub
parent c69f48f8d7
commit 7cadc5cffb
62 changed files with 233 additions and 228 deletions

View File

@@ -888,11 +888,11 @@ func (bot *Engine) LoadExchange(name string, wg *sync.WaitGroup) error {
}
if wg != nil {
return exch.Start(wg)
return exch.Start(context.TODO(), wg)
}
tempWG := sync.WaitGroup{}
err = exch.Start(&tempWG)
err = exch.Start(context.TODO(), &tempWG)
if err != nil {
return err
}