Skip to content

Commit

Permalink
Chore: Log Successful MQTT Connection (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
willsawyerrrr authored Oct 14, 2024
2 parents b672298 + eb5e43f commit f291f7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Mortein/Mqtt/Services/MqttClientService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ public async Task StartAsync(CancellationToken cancellationToken)
{
try
{
if (!await mqttClient.TryPingAsync())
if (await mqttClient.TryPingAsync())
{
_logger.LogInformation("MQTT client is connected.");
}
else
{
_logger.LogInformation("MQTT client is disconnected. Reconnecting...");

Expand Down

0 comments on commit f291f7f

Please sign in to comment.