Kaynağa Gözat
Merge pull request #884 from chkr1011/feature-isconnected
Added check if the server is started or not.
release/3.x.x
Christian
4 yıl önce
committed by
GitHub
ebeveyn
işleme
aafc99f39e
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: 4AEE18F83AFDEB23
3 değiştirilmiş dosya ile
5 ekleme ve
0 silme
-
Build/MQTTnet.nuspec
-
Source/MQTTnet/Server/IMqttServer.cs
-
Source/MQTTnet/Server/MqttServer.cs
|
|
@@ -26,6 +26,7 @@ |
|
|
|
* [Server] Added interceptor for unsubscriptions. |
|
|
|
* [Server] Removed exceptions when user properties are set with MQTT protocol version 3.1 |
|
|
|
* [Server] Added custom session items to the client status. |
|
|
|
* [Server] Added option to check whether the server is already started properly or not. |
|
|
|
* [MQTTnet.AspNetCore] improved compatibility with AspNetCore 3.1 |
|
|
|
* [MQTTnet.Server] Added interceptor for unsubscriptions. |
|
|
|
</releaseNotes> |
|
|
|
|
|
@@ -27,5 +27,7 @@ namespace MQTTnet.Server |
|
|
|
|
|
|
|
Task StartAsync(IMqttServerOptions options); |
|
|
|
Task StopAsync(); |
|
|
|
|
|
|
|
bool IsStarted { get; } |
|
|
|
} |
|
|
|
} |
|
|
@@ -190,6 +190,8 @@ namespace MQTTnet.Server |
|
|
|
return _retainedMessagesManager?.ClearMessagesAsync(); |
|
|
|
} |
|
|
|
|
|
|
|
public bool IsStarted => _cancellationTokenSource != null; |
|
|
|
|
|
|
|
private Task OnHandleClient(IMqttChannelAdapter channelAdapter) |
|
|
|
{ |
|
|
|
return _clientSessionsManager.HandleClientConnectionAsync(channelAdapter); |
|
|
|