fix(recovery):panic serving interface conversion (#644)

fix http: panic serving : interface conversion: interface {} is nil, not *zap.Logger
This commit is contained in:
联盟少侠 2024-06-12 23:53:11 +08:00 committed by GitHub
parent 6bb545a2cf
commit b4d8c32e42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ func New(ctx context.Context, backoff backoff.BackOff) telegram.Middleware {
func (r *recovery) Handle(next tg.Invoker) telegram.InvokeFunc {
return func(ctx context.Context, input bin.Encoder, output bin.Decoder) error {
log := logctx.From(ctx)
log := logctx.From(r.ctx)
return backoff.RetryNotify(func() error {
if err := next.Invoke(ctx, input, output); err != nil {