Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions apps/desktop/src-tauri/src/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,19 @@ pub fn spawn(deps: Deps) {
return;
}
};
// Children must not inherit the listener (WebView2 helpers, the
// self-update respawn): an inherited handle keeps the port bound
// after this process exits and the successor's bind dies with 10048.
#[cfg(windows)]
unsafe {
use std::os::windows::io::AsRawSocket;
use windows_sys::Win32::Foundation::{SetHandleInformation, HANDLE_FLAG_INHERIT};
SetHandleInformation(
listener.as_raw_socket() as usize as _,
HANDLE_FLAG_INHERIT,
0,
);
}
eprintln!("[http-server] listening on http://{addr}");
let app = router(state).layer(Extension(app_handle));
if let Err(err) = axum::serve(listener, app).await {
Expand Down
Loading