From abb7fe6fb68cf99eac9e205d22a982be237cfae4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 29 Jan 2024 14:14:49 +0100 Subject: [PATCH] fix: only adjust ipc path if multiple instances are run (#6275) --- crates/node-core/src/args/rpc_server_args.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/node-core/src/args/rpc_server_args.rs b/crates/node-core/src/args/rpc_server_args.rs index f9c2dbcea5..c5fc8a668c 100644 --- a/crates/node-core/src/args/rpc_server_args.rs +++ b/crates/node-core/src/args/rpc_server_args.rs @@ -219,9 +219,10 @@ impl RpcServerArgs { // ws port is scaled by a factor of instance * 2 self.ws_port += instance * 2 - 2; - // also adjust the ipc path by appending the instance number to the path used for the - // endpoint - self.ipcpath = format!("{}-{}", self.ipcpath, instance); + // if multiple instances are being run, append the instance number to the ipc path + if instance > 1 { + self.ipcpath = format!("{}-{}", self.ipcpath, instance); + } } /// Set the http port to zero, to allow the OS to assign a random unused port when the rpc