Update SocketChannelPool.java

This commit is contained in:
luoyaogui
2017-06-27 15:03:16 +08:00
committed by GitHub
parent 48c108806a
commit 9ea88c7863

View File

@@ -54,7 +54,7 @@ public abstract class SocketChannelPool {
@Override @Override
public void operationComplete(ChannelFuture arg0) throws Exception { public void operationComplete(ChannelFuture arg0) throws Exception {
if(arg0.isSuccess()) if(arg0.isSuccess())
socket.setChannel(arg0.channel(),false); socket.setChannel(arg0.channel());
synchronized (socket) { synchronized (socket) {
socket.notify(); socket.notify();
} }
@@ -73,7 +73,7 @@ public abstract class SocketChannelPool {
private SocketChannel socket=null; private SocketChannel socket=null;
@Override @Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception { public void channelInactive(ChannelHandlerContext ctx) throws Exception {
socket.setChannel(null,true); socket.setChannel(null);
chManager.remove(ctx.channel());//移除 chManager.remove(ctx.channel());//移除
} }
@Override @Override