Small code improvement,

This commit is contained in:
Kavin 2023-09-29 13:00:59 +01:00
parent 3d99bdd454
commit 0edb727a03
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
1 changed files with 1 additions and 1 deletions

View File

@ -28,8 +28,8 @@ async fn main() -> std::io::Result<()> {
// get socket/port from env
// backwards compat when only UDS is set
let socket_path = env::var("BIND_UNIX").unwrap_or_else(|_| "./socket/actix.sock".to_string());
if env::var("UDS").is_ok() {
let socket_path = env::var("BIND_UNIX").unwrap_or_else(|_| "./socket/actix.sock".to_string());
server.bind_uds(socket_path)?
} else {
let bind = env::var("BIND").unwrap_or_else(|_| "0.0.0.0:8080".to_string());