Closed canxin121 closed 3 months ago
This could be fixed by
async fn start_mqtt_server() {
let server = ntex::server::build()
.disable_signals()
·····
But this simply bypasses signal control.
If you still want to use signal control, I feel it's really difficult to really solve the closed loop of run
and stop
.
I'm afraid that's something that needs to be left to someone who knows more about ntex but not me.
could you try master
Platform
Windows
This bug seems to be platform related, because ctrlc has different behavior in unix and windows, and the start function has different definitions for win and unix.
Description
Bug appeared during an attempt to use ntex-mqtt. I tried to make mqtt_server shutdown and restart with configuration changes.
But after repeated calls to Server::run(), the run function called ntex-server's signals::start function repeatedly, which resulted in duplicate registrations of ctrlc_handler and a direct panic crash.
The process of reproducing the bug:
Log