mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Update SocketChannelPool.java
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user