This commit is contained in:
Ben Meadors
2025-04-17 18:50:59 -05:00
parent 1131f6bce9
commit f95df1069b
2 changed files with 11 additions and 4 deletions
-2
View File
@@ -23,7 +23,6 @@ async Task RunMqttServer(string[] args)
// .WriteTo.File(new RenderedCompactJsonFormatter(), "log.json", rollingInterval: RollingInterval.Hour)
.CreateLogger();
// Create and configure MQTT server
using var mqttServer = new MqttServerFactory()
.CreateMqttServer(BuildMqttServerOptions());
ConfigureMqttServer(mqttServer);
@@ -33,7 +32,6 @@ async Task RunMqttServer(string[] args)
await host.StartAsync();
var lifetime = host.Services.GetRequiredService<IHostApplicationLifetime>();
// Start MQTT server
await mqttServer.StartAsync();
// Configure graceful shutdown