Fixed WebSocket client stream

This commit is contained in:
Christian Kratky
2017-11-17 21:13:01 +01:00
parent 5bcda12ca9
commit acc269e702
11 changed files with 225 additions and 144 deletions
@@ -11,6 +11,10 @@ namespace MQTTnet.Implementations
{
public sealed class MqttWebSocketChannel : IMqttCommunicationChannel, IDisposable
{
// ReSharper disable once MemberCanBePrivate.Global
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
public static int BufferSize { get; set; } = 4096 * 20; // Can be changed for fine tuning by library user.
private readonly MqttClientWebSocketOptions _options;
private ClientWebSocket _webSocket;
@@ -80,7 +84,7 @@ namespace MQTTnet.Implementations
await _webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).ConfigureAwait(false);
}
_webSocket = null;
Dispose();
}
public void Dispose()