1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

update context

This commit is contained in:
Annika Hannig
2022-06-15 15:43:12 +02:00
parent 6ee20adecd
commit 1d16ecec15

View File

@ -180,10 +180,10 @@ func (b *GenericBirdwatcher) fetchProtocolsShort(ctx context.Context) (
timeout = time.Duration(b.config.NeighborsRefreshTimeout) * time.Second
}
timeoutCtx, cancel := context.WithTimeout(ctx, timeout)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
bird, err := b.client.GetJSON(timeoutCtx, "/protocols/short?uncached=true")
bird, err := b.client.GetJSON(ctx, "/protocols/short?uncached=true")
if err != nil {
return nil, nil, err
}