Browse Source

add missing await

release/3.x.x
Eggers Jan 7 years ago
parent
commit
8fd3e5070d
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      MQTTnet.Core/Serializer/MqttPacketSerializer.cs

+ 3
- 8
MQTTnet.Core/Serializer/MqttPacketSerializer.cs View File

@@ -38,6 +38,7 @@ namespace MQTTnet.Core.Serializer
Buffer.BlockCopy( body, 0, writeBuffer, headerArray.Length, body.Length ); Buffer.BlockCopy( body, 0, writeBuffer, headerArray.Length, body.Length );


_sendTask = Send( writeBuffer, destination ); _sendTask = Send( writeBuffer, destination );
await _sendTask.ConfigureAwait( false );
} }
} }


@@ -286,14 +287,8 @@ namespace MQTTnet.Core.Serializer
var retain = fixedHeader.Read(); var retain = fixedHeader.Read();
var qualityOfServiceLevel = (MqttQualityOfServiceLevel)fixedHeader.Read(2); var qualityOfServiceLevel = (MqttQualityOfServiceLevel)fixedHeader.Read(2);
var dup = fixedHeader.Read(); var dup = fixedHeader.Read();


var length = reader.ReadUInt16();
if (length != 5)
{
}
var topic = Encoding.UTF8.GetString( reader.ReadBytes( length ), 0, length );
var topic = reader.ReadStringWithLengthPrefix();


ushort packetIdentifier = 0; ushort packetIdentifier = 0;
if (qualityOfServiceLevel > MqttQualityOfServiceLevel.AtMostOnce) if (qualityOfServiceLevel > MqttQualityOfServiceLevel.AtMostOnce)


Loading…
Cancel
Save