Skip to content

Commit

Permalink
Server/ClientProtocolHandler: override isSharable() to get rid of unn…
Browse files Browse the repository at this point in the history
…ecessary reflection, thread locals and wasted memory.
  • Loading branch information
mostroverkhov committed May 24, 2024
1 parent 5fc287a commit f7f19c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ public ChannelFuture handshakeCompleted() {
return completed;
}

@Override
public boolean isSharable() {
return false;
}

@Override
public void handlerAdded(ChannelHandlerContext ctx) {
handshakeCompleted = ctx.newPromise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public ChannelFuture handshakeCompleted() {
return completed;
}

@Override
public boolean isSharable() {
return false;
}

@Override
public void handlerAdded(ChannelHandlerContext ctx) {
handshakeCompleted = ctx.newPromise();
Expand Down

0 comments on commit f7f19c3

Please sign in to comment.