mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Refactor Serializer memory usage.
This commit is contained in:
@@ -95,6 +95,8 @@ namespace MQTTnet.Adapter
|
||||
var packetData = PacketSerializer.Serialize(packet);
|
||||
|
||||
await _channel.WriteAsync(packetData.Array, packetData.Offset, packetData.Count, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
PacketSerializer.FreeBuffer();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user