mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
Remove client disconnected handler from wrong implementation location.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace MQTTnet.Server
|
||||
/// Gets the client identifier.
|
||||
/// Hint: This identifier needs to be unique over all used clients / devices on the broker to avoid connection issues.
|
||||
/// </summary>
|
||||
string ClientId { get; set; }
|
||||
string ClientId { get; }
|
||||
|
||||
bool EnablePersistentSessions { get; }
|
||||
|
||||
@@ -23,16 +23,13 @@ namespace MQTTnet.Server
|
||||
IMqttServerUnsubscriptionInterceptor UnsubscriptionInterceptor { get; }
|
||||
IMqttServerApplicationMessageInterceptor ApplicationMessageInterceptor { get; }
|
||||
IMqttServerClientMessageQueueInterceptor ClientMessageQueueInterceptor { get; }
|
||||
|
||||
IMqttServerApplicationMessageInterceptor UndeliveredMessageInterceptor { get; }
|
||||
|
||||
MqttServerTcpEndpointOptions DefaultEndpointOptions { get; }
|
||||
MqttServerTlsTcpEndpointOptions TlsEndpointOptions { get; }
|
||||
|
||||
IMqttServerStorage Storage { get; }
|
||||
|
||||
IMqttRetainedMessagesManager RetainedMessagesManager { get; }
|
||||
|
||||
IMqttServerApplicationMessageInterceptor UndeliveredMessageInterceptor { get; set; }
|
||||
|
||||
IMqttServerClientDisconnectedHandler ClientDisconnectedInterceptor { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet.Client.Disconnecting;
|
||||
using OperationCanceledException = System.OperationCanceledException;
|
||||
|
||||
namespace MQTTnet.Server
|
||||
{
|
||||
|
||||
@@ -34,12 +34,10 @@ namespace MQTTnet.Server
|
||||
|
||||
public IMqttServerUnsubscriptionInterceptor UnsubscriptionInterceptor { get; set; }
|
||||
|
||||
public IMqttServerApplicationMessageInterceptor UndeliveredMessageInterceptor { get; set; }
|
||||
|
||||
public IMqttServerStorage Storage { get; set; }
|
||||
|
||||
public IMqttRetainedMessagesManager RetainedMessagesManager { get; set; } = new MqttRetainedMessagesManager();
|
||||
|
||||
public IMqttServerApplicationMessageInterceptor UndeliveredMessageInterceptor { get; set; }
|
||||
|
||||
public IMqttServerClientDisconnectedHandler ClientDisconnectedInterceptor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,19 +170,7 @@ namespace MQTTnet.Server
|
||||
_options.ConnectionValidator = new MqttServerConnectionValidatorDelegate(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttServerOptionsBuilder WithDisconnectedInterceptor(IMqttServerClientDisconnectedHandler value)
|
||||
{
|
||||
_options.ClientDisconnectedInterceptor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttServerOptionsBuilder WithDisconnectedInterceptor(Action<MqttServerClientDisconnectedEventArgs> value)
|
||||
{
|
||||
_options.ClientDisconnectedInterceptor = new MqttServerClientDisconnectedHandlerDelegate(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public MqttServerOptionsBuilder WithApplicationMessageInterceptor(IMqttServerApplicationMessageInterceptor value)
|
||||
{
|
||||
_options.ApplicationMessageInterceptor = value;
|
||||
|
||||
Reference in New Issue
Block a user