default to ipc only

This commit is contained in:
John Smith 2023-12-15 19:22:06 -05:00 committed by Christien Rioux
parent d1aa488883
commit 6bfe9a0236
2 changed files with 6 additions and 3 deletions

View File

@ -130,8 +130,9 @@ fn main() -> Result<(), String> {
}
// Get client address
let enable_ipc = settings.enable_ipc && args.address.is_none();
let mut enable_network = settings.enable_network && args.ipc_path.is_none();
let enable_ipc = (settings.enable_ipc && args.address.is_none()) || args.ipc_path.is_some();
let mut enable_network =
(settings.enable_network && args.ipc_path.is_none()) || args.address.is_some();
// Determine IPC path to try
let mut client_api_ipc_path = None;
@ -209,6 +210,8 @@ fn main() -> Result<(), String> {
} else if let Some(client_api_network_address) = client_api_network_addresses {
let network_addr = client_api_network_address.first().cloned();
comproc.set_network_address(network_addr);
} else {
return Err("veilid-server could not be reached".to_owned());
}
let comproc2 = comproc.clone();

View File

@ -9,7 +9,7 @@ pub fn load_default_config() -> Result<config::Config, config::ConfigError> {
let default_config = r#"---
enable_ipc: true
ipc_path: '%IPC_DIRECTORY%'
enable_network: true
enable_network: false
address: "localhost:5959"
autoconnect: true
autoreconnect: true