Browse Source

Added check if the server is started or not.

release/3.x.x
SeppPenner 4 years ago
parent
commit
87c4fa14ee
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      Source/MQTTnet/Server/MqttServer.cs

+ 2
- 0
Source/MQTTnet/Server/MqttServer.cs View File

@@ -190,6 +190,8 @@ namespace MQTTnet.Server
return _retainedMessagesManager?.ClearMessagesAsync();
}

public bool IsStarted => _cancellationTokenSource != null;

private Task OnHandleClient(IMqttChannelAdapter channelAdapter)
{
return _clientSessionsManager.HandleClientAsync(channelAdapter);


Loading…
Cancel
Save