Skip to content

Commit

Permalink
Use tasks by default when using openssl based SSL provider (netty#11242)
Browse files Browse the repository at this point in the history
Motivation:

We introduced the ability to offload certain operations to an executor that may take some time to complete. At the moment this is not enabled by default when using the openssl based SSL provider. Let's enable it by default as we have this support for some while now and didnt see any issues yet. This will also make things less confusing and more consistent with the JDK based provider.

Modifications:

Use true as default value for io.netty.handler.ssl.openssl.useTasks.

Result:

Offloading works with openssl based SSL provider as well by default
  • Loading branch information
normanmaurer authored May 12, 2021
1 parent da2f7a4 commit d0b7f76
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ public abstract class ReferenceCountedOpenSslContext extends SslContext implemen
private static final int DEFAULT_BIO_NON_APPLICATION_BUFFER_SIZE = Math.max(1,
SystemPropertyUtil.getInt("io.netty.handler.ssl.openssl.bioNonApplicationBufferSize",
2048));
// Let's use tasks by default but still allow the user to disable it via system property just in case.
static final boolean USE_TASKS =
SystemPropertyUtil.getBoolean("io.netty.handler.ssl.openssl.useTasks", false);
SystemPropertyUtil.getBoolean("io.netty.handler.ssl.openssl.useTasks", true);
private static final Integer DH_KEY_LENGTH;
private static final ResourceLeakDetector<ReferenceCountedOpenSslContext> leakDetector =
ResourceLeakDetectorFactory.instance().newResourceLeakDetector(ReferenceCountedOpenSslContext.class);
Expand Down

0 comments on commit d0b7f76

Please sign in to comment.