We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If there is a connection, shutting down the server will be stuck for 30 seconds.
Steps to reproduce the behavior:
using MQTTnet.AspNetCore; using MQTTnet.Server; var builder = WebApplication.CreateSlimBuilder(args); builder.WebHost.UseKestrel(x => { x.ListenLocalhost(1883, l => l.UseMqtt()); x.ListenAnyIP(5001); }); builder.Services.AddConnections(); builder.Services.AddMqttConnectionHandler(); builder.Services.AddHostedMqttServer(x => { x.WithDefaultEndpoint(); x.WithPersistentSessions(false); }); var app = builder.Build(); // Uncomment the code below, it will shut down quickly. // app.Lifetime.ApplicationStopping.Register(() => { // app.Services.GetRequiredService<MqttServer>().StopAsync(); // }); app.Run();
telnet 127.0.0.1 1883
I'm not sure if it's intentional, but I hope it shuts down gracefully asap.
The text was updated successfully, but these errors were encountered:
I am also experiencing this behavior. Any update here? What is the workaround for a graceful shutdown?
Sorry, something went wrong.
This seems to be related to ASP since a server shutdown is pretty fast when using the code from the samples app.
Could you please try without port 5001 and let me know if there is any difference in behavior?
When branches are created from issues, their pull requests are automatically linked.
Describe the bug
If there is a connection, shutting down the server will be stuck for 30 seconds.
Which component is your bug related to?
To Reproduce
Steps to reproduce the behavior:
telnet 127.0.0.1 1883
Expected behavior
I'm not sure if it's intentional, but I hope it shuts down gracefully asap.
The text was updated successfully, but these errors were encountered: