Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
beppemarazzi committed Jan 6, 2025
1 parent 4eb737f commit 672435c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/MQTTnet.AspnetCore/MqttHostedServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ IMqttNetLogger logger
}

public MqttServer MqttServer { get; }
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
await MqttServer.StartAsync();
}
protected override Task ExecuteAsync(CancellationToken stoppingToken)
=> MqttServer.StartAsync();
public override async Task StopAsync(CancellationToken cancellationToken)
{
await MqttServer.StopAsync(_mqttFactory.CreateMqttServerStopOptionsBuilder().Build());
Expand Down

0 comments on commit 672435c

Please sign in to comment.