[Update]去掉多余的日志

This commit is contained in:
chenfufeng
2022-04-06 20:33:52 +08:00
parent f33d5e9263
commit 357cc49845
5 changed files with 1 additions and 5 deletions

View File

@@ -211,7 +211,6 @@ public class NettyTcpClient {
}
public void reconnectServer() {
Log.d(TAG, "ReconnectServer function is called.");
if (!TextUtils.isEmpty(host)) {
doConnect();
}

View File

@@ -93,7 +93,6 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<MogoProtocol
*/
@Override
protected void channelRead0(ChannelHandlerContext ctx, MogoProtocolMsg msg) throws Exception {
Logger.d(TAG, "Client channelRead0:" + msg.toString());
if (msg.getProtocolType() == MogoProtocolMsg.IDENTITY_REGIST) {
String sn = new String(msg.getBody());
NettyTcpClient.sSERVER_SN = sn;

View File

@@ -56,7 +56,6 @@ class ReconnectHandler(private val mNettyClient: NettyTcpClient) : ChannelInboun
}
Logger.d(TAG, "${sleepTimeMs}ms后执行重连操作")
scheduledThreadPool.schedule({
Logger.d(TAG, "Reconnecting server ...")
// 异步重连或单独线程池中同步重连不要阻塞netty的io线程同时也不要关闭EventLoopGroup
mNettyClient.reconnectServer()
}, sleepTimeMs, TimeUnit.MILLISECONDS)

View File

@@ -32,7 +32,6 @@ public class MogoProtocolServerHandler extends SimpleChannelInboundHandler<MogoP
@Override
protected void channelRead0(ChannelHandlerContext ctx, MogoProtocolMsg msg) throws Exception {
Logger.d(TAG, "server$channelRead0():" + msg.toString());
if (msg.getProtocolType() == MogoProtocolMsg.IDENTITY_REGIST) {
String sn = new String(msg.getBody());
NettyTcpServer.getInstance().putChannelSN(ctx.channel().id(), sn);

View File

@@ -158,7 +158,7 @@ public class NettyTcpServer {
public void sendMsgToAllClients(MogoProtocolMsg mogoProtocolMsg) {
for (Channel chl : channelList) {
if (chl != null && chl.isActive()) {
chl.writeAndFlush(mogoProtocolMsg).addListener(mProxyListener);
chl.writeAndFlush(mogoProtocolMsg);
}
}
}