Skip to content

Commit

Permalink
Specify comparison rule in topic filter
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanGreve committed Aug 31, 2024
1 parent 3709dc2 commit 95e97fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AdvancedSystems.Core/Services/MessageBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async ValueTask PublishAsync<T>(T message, string? topic = default, Cance

topic ??= DEFAULT_TOPIC;
var snapshot = this._broadcasts.Values
.Where(x => string.Equals(x.Topic, topic))
.Where(x => string.Equals(x.Topic, topic, StringComparison.Ordinal))
.ToList();

if (snapshot.Count == 0) throw new InvalidOperationException($"Unknown topic ('{topic}').");
Expand Down

0 comments on commit 95e97fa

Please sign in to comment.