Enable to dynamically enable IPC when explicitly called

This commit is contained in:
Robinson 2023-09-07 12:23:47 +02:00
parent 9d0d8efdc0
commit 8428d9899d
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 7 additions and 1 deletions

View File

@ -185,7 +185,13 @@ open class Server<CONNECTION : Connection>(
* Binds the server IPC only, using the previously set AERON configuration
*/
fun bindIpc() {
require(config.enableIpc) { "IPC is not enabled, yet requested. Unable to continue." }
if (!config.enableIpc) {
logger.warn { "IPC explicitly requested, but not enabled. Enabling IPC..." }
// we explicitly requested IPC, make sure it's enabled
config.contextDefined = false
config.enableIpc = true
config.contextDefined = true
}
if (config.enableIPv4) { logger.warn { "IPv4 is enabled, but only IPC will be used." }}
if (config.enableIPv6) { logger.warn { "IPv6 is enabled, but only IPC will be used." }}