summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/ipc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index 03113902d..559c65a59 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -145,15 +145,15 @@ void IPC::start()
if (ipc)
return;
- unsigned short ipc_port(44007);
+ unsigned short port(44007);
if (getenv("IPC_PORT"))
- ipc_port = atoi(getenv("IPC_PORT"));
+ port = atoi(getenv("IPC_PORT"));
logger->log("Starting IPC...");
- while (true)
+ for (int port = 44007; port < 65535; port ++)
{
logger->log(" -> trying port %d...", ipc_port);
- ipc = new IPC(ipc_port);
+ ipc = new IPC(port);
if (ipc->init())
{
logger->log(" -> Port %d selected", ipc_port);
@@ -161,7 +161,7 @@ void IPC::start()
}
else
{
- ipc_port ++;
+ port ++;
}
}
}