Start/Stop IPC when changing the config setting

This commit is contained in:
Megamouse 2023-12-14 22:30:25 +01:00
parent 907e0fa8c8
commit f8e0c9e27a
2 changed files with 15 additions and 1 deletions

View file

@ -108,12 +108,14 @@ namespace IPC_socket
int port = g_cfg_ipc.get_port();
if (!m_ipc_server || port != m_old_port)
{
IPC.notice("Starting server with port %d", port);
m_ipc_server = std::make_unique<IPC_server>();
m_old_port = port;
}
}
else
else if (m_ipc_server)
{
IPC.notice("Stopping server");
m_ipc_server.reset();
}
}