Fixed sendBufferSize defaults. Explicitly not setting defaults if the context has been defined.

This commit is contained in:
Robinson 2022-03-21 13:41:46 +01:00
parent 97efa8eed7
commit 3cac148db6
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -55,6 +55,11 @@ class AeronDriver(
private const val AERON_PUBLICATION_LINGER_TIMEOUT = 5_000L // in MS
private fun setConfigDefaults(config: Configuration, logger: KLogger) {
// explicitly don't set defaults if we already have the context defined!
if (config.contextDefined) {
return
}
/*
* Linux
* Linux normally requires some settings of sysctl values. One is net.core.rmem_max to allow larger SO_RCVBUF and
@ -81,7 +86,7 @@ class AeronDriver(
if (config.sendBufferSize == 0) {
config.receiveBufferSize = io.aeron.driver.Configuration.SOCKET_SNDBUF_LENGTH_DEFAULT
config.sendBufferSize = io.aeron.driver.Configuration.SOCKET_SNDBUF_LENGTH_DEFAULT
// when {
// OS.isLinux() ->
// OS.isWindows() ->