mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
MQTTnet: Adjusted UndeliveredMessageInterceptor handler to return if it's null instead of throwing an exception.
This commit is contained in:
@@ -238,7 +238,7 @@ namespace MQTTnet.Server
|
|||||||
{
|
{
|
||||||
if (_options.UndeliveredMessageInterceptor == null)
|
if (_options.UndeliveredMessageInterceptor == null)
|
||||||
{
|
{
|
||||||
throw new OperationCanceledException(nameof(_options.UndeliveredMessageInterceptor));
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _options.UndeliveredMessageInterceptor.InterceptApplicationMessagePublishAsync(new MqttApplicationMessageInterceptorContext(sender?.ClientId, sender?.Session?.Items, applicationMessage));
|
await _options.UndeliveredMessageInterceptor.InterceptApplicationMessagePublishAsync(new MqttApplicationMessageInterceptorContext(sender?.ClientId, sender?.Session?.Items, applicationMessage));
|
||||||
|
|||||||
Reference in New Issue
Block a user