Skip to content

Commit

Permalink
bugfix: fix channelHandler not sharable (apache#2258)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly committed Feb 17, 2020
1 parent 75f3d36 commit ca9a1c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.function.Function;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
Expand Down Expand Up @@ -273,6 +274,7 @@ private void printMergeMessageLog(MergedWarpMessage mergeMessage) {
/**
* The type ClientHandler.
*/
@Sharable
class ClientHandler extends AbstractHandler {

@Override
Expand Down
8 changes: 3 additions & 5 deletions core/src/main/java/io/seata/core/rpc/netty/RpcServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,22 @@
*/
package io.seata.core.rpc.netty;

import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeoutException;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler.Sharable;
import io.seata.core.protocol.HeartbeatMessage;
import io.seata.core.protocol.RpcMessage;
import io.seata.core.rpc.ChannelManager;
import io.seata.core.rpc.DefaultServerMessageListenerImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeoutException;

/**
* The type Abstract rpc server.
*
* @author slievrly
*/
@Sharable
public class RpcServer extends AbstractRpcRemotingServer {

private static final Logger LOGGER = LoggerFactory.getLogger(RpcServer.class);
Expand Down

0 comments on commit ca9a1c2

Please sign in to comment.