fix: only adjust ipc path if multiple instances are run (#6275)

This commit is contained in:
Matthias Seitz
2024-01-29 14:14:49 +01:00
committed by GitHub
parent c46ff698ba
commit abb7fe6fb6

View File

@@ -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