diff --git a/src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs b/src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs index 958a698..bfe2180 100644 --- a/src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs +++ b/src/DotNetCore.CAP/Serialization/ISerializer.JsonUtf8.cs @@ -36,7 +36,7 @@ namespace DotNetCore.CAP.Serialization public Task 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)); }