Przeglądaj źródła

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

master
Savorboard 2 lat temu
rodzic
commit
1972145c0b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs

+ 1
- 1
src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs Wyświetl plik

@@ -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));
}


Ładowanie…
Anuluj
Zapisz