mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
app/abi/manager.go: its probably a good thing (tm) to set a context timout when getting the abi from the api.
This commit is contained in:
parent
7b1b500b22
commit
eeab11c44b
1 changed files with 3 additions and 1 deletions
|
|
@ -45,7 +45,9 @@ func (mgr *AbiManager) GetAbi(account eos.AccountName) (*eos.ABI, error) {
|
|||
|
||||
abi, err := mgr.cache.Get(key)
|
||||
if err != nil {
|
||||
resp, err := mgr.api.GetABI(mgr.ctx, account)
|
||||
ctx, cancel := context.WithTimeout(mgr.ctx, time.Second)
|
||||
defer cancel()
|
||||
resp, err := mgr.api.GetABI(ctx, account)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("api: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue