Bläddra i källkod

Remove useless stream flush

release/3.x.x
Israel Lot 6 år sedan
förälder
incheckning
11ba46d140
1 ändrade filer med 5 tillägg och 9 borttagningar
  1. +5
    -9
      Frameworks/MQTTnet.NetStandard/Adapter/MqttChannelAdapter.cs

+ 5
- 9
Frameworks/MQTTnet.NetStandard/Adapter/MqttChannelAdapter.cs Visa fil

@@ -76,7 +76,11 @@ namespace MQTTnet.Adapter
{
return;
}
await _channel.SendStream.WriteAsync(packetData.Array, packetData.Offset, (int)packetData.Count, cancellationToken).ConfigureAwait(false);
await _channel.SendStream.WriteAsync(
packetData.Array,
packetData.Offset,
(int)packetData.Count,
cancellationToken).ConfigureAwait(false);

}

@@ -85,14 +89,6 @@ namespace MQTTnet.Adapter
return;
}

if (timeout > TimeSpan.Zero)
{
await _channel.SendStream.FlushAsync(cancellationToken).TimeoutAfter(timeout).ConfigureAwait(false);
}
else
{
await _channel.SendStream.FlushAsync(cancellationToken).ConfigureAwait(false);
}
});
}



Laddar…
Avbryt
Spara