Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-03-21 20:26:02 -04:00
parent 8b747c1c40
commit 7e6090274a
1 changed files with 1 additions and 0 deletions

View File

@ -229,6 +229,7 @@ async fn main() -> Result<()> {
match std::env::var("SOCKPATH") { match std::env::var("SOCKPATH") {
Ok(sockpath) => { Ok(sockpath) => {
let _ = std::fs::remove_file(&sockpath);
let uds = UnixListener::bind(&sockpath)?; let uds = UnixListener::bind(&sockpath)?;
axum::Server::builder(ServerAccept { uds }) axum::Server::builder(ServerAccept { uds })
.serve(app.into_make_service_with_connect_info::<UdsConnectInfo, _>()) .serve(app.into_make_service_with_connect_info::<UdsConnectInfo, _>())