Commit 75f2bc6d by huangfusuper

修改测试环境的配置

parent 86c6f246
...@@ -45,7 +45,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<RpcResponse> ...@@ -45,7 +45,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<RpcResponse>
logger.debug(">>>>>>>>>>> myth-rpc netty client close an idle channel.");*/ logger.debug(">>>>>>>>>>> myth-rpc netty client close an idle channel.");*/
nettyConnectClient.send(Beat.BEAT_PING); // beat N, close if fail(may throw error) nettyConnectClient.send(Beat.BEAT_PING); // beat N, close if fail(may throw error)
logger.info(">>>>>>>>>>> myth-rpc netty client send beat-ping."+ctx.channel().id().asShortText()); logger.info(">>>>>>>>>>> myth-rpc netty client send beat-ping.");
} else { } else {
super.userEventTriggered(ctx, evt); super.userEventTriggered(ctx, evt);
......
...@@ -71,7 +71,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<RpcRequest> ...@@ -71,7 +71,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<RpcRequest>
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof IdleStateEvent){ if (evt instanceof IdleStateEvent){
ctx.channel().close(); // beat 3N, close if idle ctx.channel().close(); // beat 3N, close if idle
logger.info(">>>>>>>>>>> myth-rpc provider netty server close an idle channel."+ctx.channel().id()); logger.info(">>>>>>>>>>> myth-rpc provider netty server close an idle channel.");
} else { } else {
super.userEventTriggered(ctx, evt); super.userEventTriggered(ctx, evt);
} }
......
...@@ -32,7 +32,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<PluginRpcRes ...@@ -32,7 +32,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<PluginRpcRes
//判断事件是否是心跳事件 //判断事件是否是心跳事件
if( evt instanceof IdleStateEvent){ if( evt instanceof IdleStateEvent){
pluginConnectClient.send(PluginBeat.PLUGIN_RPC_REQUEST_PACKET); pluginConnectClient.send(PluginBeat.PLUGIN_RPC_REQUEST_PACKET);
System.out.println("------客户端发送心跳请求-----"+ctx.channel().id().asShortText()); System.out.println("------客户端发送心跳请求-----");
}else{ }else{
super.userEventTriggered(ctx, evt); super.userEventTriggered(ctx, evt);
} }
......
...@@ -42,7 +42,7 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin ...@@ -42,7 +42,7 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
@Override @Override
protected void channelRead0(ChannelHandlerContext ctx, PluginRpcRequestPacket msg) { protected void channelRead0(ChannelHandlerContext ctx, PluginRpcRequestPacket msg) {
if(PluginBeat.BEAT_ID.equals(msg.getRequestId())){ if(PluginBeat.BEAT_ID.equals(msg.getRequestId())){
System.out.println("------接收到客户端的心跳连接-------"+ctx.channel().id().asShortText()); System.out.println("------接收到客户端的心跳连接-------");
return; return;
} }
PluginRpcResponsePacket transferPluginRpcResponse = new PluginRpcResponsePacket(); PluginRpcResponsePacket transferPluginRpcResponse = new PluginRpcResponsePacket();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment