MQTTnet: Adjusted UndeliveredMessageInterceptor handler to return if it's null instead of throwing an exception.

This commit is contained in:
SeppPenner
2020-06-10 11:52:55 +02:00
parent 75dfe68a94
commit c20142671f
@@ -238,7 +238,7 @@ namespace MQTTnet.Server
{
if (_options.UndeliveredMessageInterceptor == null)
{
throw new OperationCanceledException(nameof(_options.UndeliveredMessageInterceptor));
return;
}
await _options.UndeliveredMessageInterceptor.InterceptApplicationMessagePublishAsync(new MqttApplicationMessageInterceptorContext(sender?.ClientId, sender?.Session?.Items, applicationMessage));