浏览代码

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

master
Savorboard 2 年前
父节点
当前提交
1972145c0b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs

+ 1
- 1
src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs 查看文件

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


正在加载...
取消
保存