Skip to content

Commit

Permalink
We must initialize the DefaultChannelId class at runtime as it uses t…
Browse files Browse the repository at this point in the history
…he process id.

Without, it takes the process id from the build time.

(cherry picked from commit 5a34f3f)
  • Loading branch information
cescoffier authored and gsmet committed Jul 19, 2022
1 parent f23ca08 commit c1d51bd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ NativeImageConfigBuildItem build(
.addRuntimeInitializedClass("io.netty.buffer.PooledByteBufAllocator")
.addRuntimeInitializedClass("io.netty.buffer.ByteBufAllocator")
.addRuntimeInitializedClass("io.netty.buffer.ByteBufUtil")
// The default channel id uses the process id, it should not be cached in the native image.
.addRuntimeInitializedClass("io.netty.channel.DefaultChannelId")
.addNativeImageSystemProperty("io.netty.leakDetection.level", "DISABLED");

if (QuarkusClassLoader.isClassPresentAtRuntime("io.netty.handler.codec.http.HttpObjectEncoder")) {
Expand Down

0 comments on commit c1d51bd

Please sign in to comment.