Skip to content

Commit 3db0f40

Browse files
author
Gábor Zavarkó
committed
fix for empty routing keys
1 parent 31433b9 commit 3db0f40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

projects/RabbitMQ.Client/client/impl/RabbitMQActivitySource.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ internal static Activity Receive(string routingKey, string exchange, ulong deliv
116116
private static string GetString(ReadOnlySpan<byte> span)
117117
{
118118
#if NETSTANDARD
119+
if (span.Length == 0)
120+
{
121+
return string.Empty;
122+
}
123+
119124
unsafe
120125
{
121126
fixed (byte* bytesPtr = span)

0 commit comments

Comments
 (0)