Fix awaits in try/catch

This commit is contained in:
Christian Kratky
2017-09-12 21:50:07 +02:00
parent f7a8b764d0
commit 16bc9cb203
8 changed files with 40 additions and 38 deletions
@@ -78,13 +78,13 @@ namespace MQTTnet.Implementations
}
}
public Task WriteAsync(byte[] buffer)
public async Task WriteAsync(byte[] buffer)
{
if (buffer == null) throw new ArgumentNullException(nameof(buffer));
try
{
return _dataStream.WriteAsync(buffer, 0, buffer.Length);
await _dataStream.WriteAsync(buffer, 0, buffer.Length);
}
catch (SocketException exception)
{