Skip to content

Commit

Permalink
subscribe to non empty topics
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotr7 committed Mar 3, 2024
1 parent 5b719ae commit 951762c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Artemis.Plugins.Mqtt/MqttConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task Start(MqttConnectionSettings settings, IEnumerable<string> top
await _client.StopAsync();
await _client.StartAsync(managedClientOptions);
await Task.WhenAll(
topics.Select(topic => _client.SubscribeAsync(topic))
topics.Where(t => !string.IsNullOrWhiteSpace(t)).Select(topic => _client.SubscribeAsync(topic))
);
await _client.SubscribeAsync("#");
}
Expand Down

0 comments on commit 951762c

Please sign in to comment.