Pārlūkot izejas kodu

Fixes deserialization exception when message body is empty byte array. (#1087)

master
Savorboard pirms 2 gadiem
vecāks
revīzija
1972145c0b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs

+ 1
- 1
src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs Parādīt failu

@@ -36,7 +36,7 @@ namespace DotNetCore.CAP.Serialization

public Task<Message> DeserializeAsync(TransportMessage transportMessage, Type? valueType)
{
if (valueType == null || transportMessage.Body == null)
if (valueType == null || transportMessage.Body == null || transportMessage.Body.Length == 0)
{
return Task.FromResult(new Message(transportMessage.Headers, null));
}


Notiek ielāde…
Atcelt
Saglabāt