mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
Fix awaits in try/catch
This commit is contained in:
@@ -79,13 +79,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user