diff --git a/client/localsession.go b/client/localsession.go index d43750e..fbe8b3b 100644 --- a/client/localsession.go +++ b/client/localsession.go @@ -27,6 +27,10 @@ import ( func CtxRecover(hdl backup.BackupHandler) client.Middleware { return func(next client.Endpoint) client.Endpoint { return func(ctx context.Context, req *protocol.Request, resp *protocol.Response) (err error) { + // only recover ctx in sd model + if !req.Options().IsSD() { + return next(ctx, req, resp) + } ctx = backup.RecoverCtxOnDemands(ctx, hdl) return next(ctx, req, resp) }