mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-08-14 23:50:45 +00:00
Small code improvement,
This commit is contained in:
parent
3d99bdd454
commit
0edb727a03
1 changed files with 1 additions and 1 deletions
|
@ -28,8 +28,8 @@ async fn main() -> std::io::Result<()> {
|
||||||
|
|
||||||
// get socket/port from env
|
// get socket/port from env
|
||||||
// backwards compat when only UDS is set
|
// 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() {
|
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)?
|
server.bind_uds(socket_path)?
|
||||||
} else {
|
} else {
|
||||||
let bind = env::var("BIND").unwrap_or_else(|_| "0.0.0.0:8080".to_string());
|
let bind = env::var("BIND").unwrap_or_else(|_| "0.0.0.0:8080".to_string());
|
||||||
|
|
Loading…
Reference in a new issue