diff --git a/workflow/workflow.go b/workflow/workflow.go index 216fddc..b43ad53 100644 --- a/workflow/workflow.go +++ b/workflow/workflow.go @@ -228,6 +228,9 @@ func (wf *Workflow) DoXa(dbConf dtmcli.DBConf, fn func(db *sql.DB) ([]byte, erro func Interceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { logger.Debugf("grpc client calling: %s%s %v", cc.Target(), method, dtmimp.MustMarshalString(req)) wf := ctx.Value(wfMeta{}).(*Workflow) + if wf == nil { + return nil + } origin := func() error { ctx1 := dtmgimp.TransInfo2Ctx(ctx, wf.Gid, wf.TransType, wf.currentBranch, wf.currentOp, wf.Dtm)