Skip to content

Commit fd92c57

Browse files
Merge pull request #55 from rabbitmq/rabbitmq-dotnet-client-53
Ensure body is cleared after we return encoded content
2 parents faa6907 + ff456b3 commit fd92c57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/client/RabbitMQ.Client/src/client/content/MapMessageBuilder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ public MapMessageBuilder(IModel model, int initialAccumulatorSize)
8383
/// </remarks>
8484
public override byte[] GetContentBody()
8585
{
86-
Body = null;
8786
MapWireFormatting.WriteMap(Writer, Body);
88-
return base.GetContentBody();
87+
var res = base.GetContentBody();
88+
Body = null;
89+
return res;
8990
}
9091

9192
/// <summary>

0 commit comments

Comments
 (0)