Bug report for `trillium-async-std`: Ctrl-C crashes the server on Windows
quixoticaxis opened this issue · comments
Describe the bug
The handling of Ctrl-C currently fails on Windows: pressing Ctrl-C leads to crash.
To Reproduce
- Run the following code:
fn main() {
trillium_async_std::config()
.with_host("127.0.0.1")
.with_port(7878)
.run(|conn: Conn| async move { conn.ok("It will fail")})
}
- Press Ctrl-C.
- The server would crash with the following message:
error: process didn't exit successfully:
target\debug\trillium-fun.exe
(exit code: 0xc000013a, STATUS_CONTROL_C_EXIT)
Expected behavior
The server stops gracefully.
Screenshots
Not applicable.
Desktop
- OS: Windows 11 (Microsoft Windows [Version 10.0.22000.593])
- Browser: does not matter
- Version: from
cargo.lock
, trillium 0.2.2, trillium-asyn-std 0.2.0
Additional context
Just in case I checked the other adapters: trillium-tokio
and trillium-smol
fail in the same way.