Skip to content

Commit 7f45f98

Browse files
[Host.Mqtt] First check for equals for mqtt
Signed-off-by: Vincent Vandenbosch <[email protected]>
1 parent 9a733f4 commit 7f45f98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SlimMessageBus.Host.Mqtt/MqttMessageBus.cs

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ protected override async Task DestroyConsumers()
110110

111111
private static bool CheckTopic(string allowedTopic, string topic)
112112
{
113+
if (string.Equals(allowedTopic, topic))
114+
return true;
113115
var realTopicRegex = allowedTopic.Replace(@"/", @"\/").Replace("+", @"[a-zA-Z0-9 _.-]*").Replace("#", @"[a-zA-Z0-9 \/_#+.-]*");
114116
var regex = new Regex(realTopicRegex);
115117
return regex.IsMatch(topic);

0 commit comments

Comments
 (0)