ConfigureAwait(false)

This commit is contained in:
1iveowl
2017-09-09 00:48:50 +02:00
parent 96b92aabae
commit 20a1b77b58
8 changed files with 86 additions and 90 deletions
@@ -18,12 +18,12 @@ namespace MQTTnet.Core.Tests
public async Task ConnectAsync(MqttClientOptions options, TimeSpan timeout)
{
await Task.FromResult(0);
await Task.FromResult(0).ConfigureAwait(false);
}
public async Task DisconnectAsync()
{
await Task.FromResult(0);
await Task.FromResult(0).ConfigureAwait(false);
}
public async Task SendPacketAsync(MqttBasePacket packet, TimeSpan timeout)
@@ -31,14 +31,14 @@ namespace MQTTnet.Core.Tests
ThrowIfPartnerIsNull();
Partner.SendPacketInternal(packet);
await Task.FromResult(0);
await Task.FromResult(0).ConfigureAwait(false);
}
public async Task<MqttBasePacket> ReceivePacketAsync(TimeSpan timeout)
{
ThrowIfPartnerIsNull();
return await Task.Run(() => _incomingPackets.Take());
return await Task.Run(() => _incomingPackets.Take()).ConfigureAwait(false);
}
private void SendPacketInternal(MqttBasePacket packet)