Browse Source

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

master
Savorboard 2 years ago
parent
commit
1972145c0b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs

+ 1
- 1
src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs View File

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


Loading…
Cancel
Save