fix server subscriber
Some checks failed
codeql / analyze (go) (pull_request) Failing after 3m17s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m30s
prbuild / lint (pull_request) Failing after 2m34s
autoapprove / autoapprove (pull_request) Failing after 1m27s
automerge / automerge (pull_request) Failing after 4s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-08-24 09:25:03 +03:00
parent fdffd31ed3
commit a34c33e25b

View File

@ -122,6 +122,7 @@ func NewServerSubscriberWrapper() server.SubscriberWrapper {
if id, ok := msg.Header()[DefaultMetadataKey]; ok { if id, ok := msg.Header()[DefaultMetadataKey]; ok {
imd.Set(DefaultMetadataKey, id) imd.Set(DefaultMetadataKey, id)
omd.Set(DefaultMetadataKey, id) omd.Set(DefaultMetadataKey, id)
ctx = context.WithValue(ctx, XRequestIDKey, id)
ctx = metadata.NewIncomingContext(ctx, imd) ctx = metadata.NewIncomingContext(ctx, imd)
ctx = metadata.NewOutgoingContext(ctx, omd) ctx = metadata.NewOutgoingContext(ctx, omd)
} else if ctx, err = DefaultMetadataFunc(ctx); err != nil { } else if ctx, err = DefaultMetadataFunc(ctx); err != nil {