diff --git a/median/plugin.go b/median/plugin.go index 501e117..f958d5a 100644 --- a/median/plugin.go +++ b/median/plugin.go @@ -46,7 +46,8 @@ func (p *Plugin) NewMedianFactory(ctx context.Context, provider types.MedianProv GasPriceSubunitsDataSource: gasPriceSubunits, IncludeGasPriceSubunitsInObservation: includeGasPriceSubunitsInObservation, Logger: logger.NewOCRWrapper(lggr, true, func(msg string) { - ctx, cancelFn := p.stop.NewCtx() + var cancelFn context.CancelFunc + ctx, cancelFn = p.stop.NewCtx() defer cancelFn() if err := errorLog.SaveError(ctx, msg); err != nil { lggr.Errorw("Unable to save error", "err", msg)