fixed index out of range

This commit is contained in:
Jan Eggers
2017-10-24 12:45:26 +02:00
parent 1ca9b0bd62
commit d594b1447f
2 changed files with 3 additions and 1 deletions
@@ -41,6 +41,7 @@ namespace MQTTnet.Implementations
{
var response = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, currentOffset, count), cancellationToken).ConfigureAwait(false);
currentOffset += response.Count;
count -= response.Count;
if (response.MessageType == WebSocketMessageType.Close)
{