Skip to content

Commit

Permalink
feat: only recover in sd mode
Browse files Browse the repository at this point in the history
  • Loading branch information
welkeyever committed May 17, 2024
1 parent 49d165b commit b95c3d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/localsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b95c3d7

Please sign in to comment.