Browse Source

Merge pull request #21467 from abpframework/auto-merge/rel-9-0/3243

Merge branch dev with rel-9.0
pull/21484/head
maliming 2 years ago
committed by GitHub
parent
commit
97c72cd617
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusBase.cs
  2. 6
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs
  3. 6
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs

8
framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/DistributedEventBusBase.cs

@ -132,7 +132,13 @@ public abstract class DistributedEventBusBase : EventBusBase, IDistributedEventB
Serialize(eventData),
Clock.Now
);
outgoingEventInfo.SetCorrelationId(CorrelationIdProvider.Get()!);
var correlationId = CorrelationIdProvider.Get();
if (correlationId != null)
{
outgoingEventInfo.SetCorrelationId(correlationId);
}
await eventOutbox.EnqueueAsync(outgoingEventInfo);
return true;
}

6
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs

@ -314,7 +314,11 @@ public class ClientProxyBase<TService> : ITransientDependency
}
//CorrelationId
requestMessage.Headers.Add(AbpCorrelationIdOptions.Value.HttpHeaderName, CorrelationIdProvider.Get());
var correlationId = CorrelationIdProvider.Get();
if (correlationId != null)
{
requestMessage.Headers.Add(AbpCorrelationIdOptions.Value.HttpHeaderName, correlationId);
}
//TenantId
if (CurrentTenant.Id.HasValue)

6
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs

@ -126,7 +126,11 @@ public class ApiDescriptionFinder : IApiDescriptionFinder, ITransientDependency
protected virtual void AddHeaders(HttpRequestMessage requestMessage)
{
//CorrelationId
requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get());
var correlationId = CorrelationIdProvider.Get();
if (correlationId != null)
{
requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, correlationId);
}
//TenantId
if (CurrentTenant.Id.HasValue)

Loading…
Cancel
Save