Commit 75f2bc6d by huangfusuper

修改测试环境的配置

parent 86c6f246
......@@ -45,7 +45,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<RpcResponse>
logger.debug(">>>>>>>>>>> myth-rpc netty client close an idle channel.");*/
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 {
super.userEventTriggered(ctx, evt);
......
......@@ -71,7 +71,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<RpcRequest>
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof IdleStateEvent){
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 {
super.userEventTriggered(ctx, evt);
}
......
......@@ -32,7 +32,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<PluginRpcRes
//判断事件是否是心跳事件
if( evt instanceof IdleStateEvent){
pluginConnectClient.send(PluginBeat.PLUGIN_RPC_REQUEST_PACKET);
System.out.println("------客户端发送心跳请求-----"+ctx.channel().id().asShortText());
System.out.println("------客户端发送心跳请求-----");
}else{
super.userEventTriggered(ctx, evt);
}
......
......@@ -42,7 +42,7 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
@Override
protected void channelRead0(ChannelHandlerContext ctx, PluginRpcRequestPacket msg) {
if(PluginBeat.BEAT_ID.equals(msg.getRequestId())){
System.out.println("------接收到客户端的心跳连接-------"+ctx.channel().id().asShortText());
System.out.println("------接收到客户端的心跳连接-------");
return;
}
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