boaks commented on code in PR #12769: URL: https://github.com/apache/camel/pull/12769#discussion_r1457592940
########## components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java: ########## @@ -500,18 +531,14 @@ public CoapClient createCoapClient(URI uri) throws IOException, GeneralSecurityE client.setEndpoint(coapBuilder.build()); } else if (CoAPEndpoint.enableTCP(getUri())) { - NetworkConfig config = NetworkConfig.createStandardWithoutFile(); - int tcpThreads = config.getInt(NetworkConfig.Keys.TCP_WORKER_THREADS); - int tcpConnectTimeout = config.getInt(NetworkConfig.Keys.TCP_CONNECT_TIMEOUT); - int tcpIdleTimeout = config.getInt(NetworkConfig.Keys.TCP_CONNECTION_IDLE_TIMEOUT); TcpClientConnector tcpConnector = null; // TLS + TCP if (getUri().getScheme().startsWith("coaps")) { SSLContext sslContext = getSslContextParameters().createSSLContext(getCamelContext()); - tcpConnector = new TlsClientConnector(sslContext, tcpThreads, tcpConnectTimeout, tcpIdleTimeout); + tcpConnector = new TlsClientConnector(sslContext, Configuration.createStandardWithoutFile()); Review Comment: Using `Configuration.createStandardWithoutFile()` will use the defaults only. There is a difference of calling "createStandardWithoutFile" and "getStandard" successive. Usually Californium uses a property file for the settings. If you don't want that or the environment don't support files, calling "createStandardWithoutFile" overcomes that. The you usually apply your config values and the use that Configuration instance for building new Californium components. In same cases (historically), users call createStandardWithoutFile, apply their changes and the call "getStandard()" instead of passing the Configuration instance around. Some may even use createStandardWithoutFile by intention, but then it's required to adapt the configuration again (or take the defaults). Hope it gets clearer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org