|
|
@@ -3,6 +3,7 @@ using System.IO; |
|
|
|
using System.Net.WebSockets; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using MQTTnet.Core.Exceptions; |
|
|
|
|
|
|
|
namespace MQTTnet.Implementations |
|
|
|
{ |
|
|
@@ -49,6 +50,11 @@ namespace MQTTnet.Implementations |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (_webSocket.State == WebSocketState.Closed) |
|
|
|
{ |
|
|
|
throw new MqttCommunicationException( "connection closed" ); |
|
|
|
} |
|
|
|
|
|
|
|
return currentOffset - offset; |
|
|
|
} |
|
|
|
|
|
|
|