Github user jinossy commented on a diff in the pull request:
https://github.com/apache/tajo/pull/311#discussion_r22711753
--- Diff: tajo-rpc/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
---
@@ -116,34 +124,24 @@ public void connect(InetSocketAddress addr) throws
ConnectTimeoutException {
handleConnectionInternally(addr);
}
- public boolean isConnected() {
- return getChannel().isConnected();
+ public boolean isActive() {
+ return getChannel().isActive();
}
public InetSocketAddress getRemoteAddress() {
- if (channelFuture == null || channelFuture.getChannel() == null) {
+ if (channelFuture == null || channelFuture.channel() == null) {
return null;
}
- return (InetSocketAddress)
channelFuture.getChannel().getRemoteAddress();
+ return (InetSocketAddress) channelFuture.channel().remoteAddress();
}
public Channel getChannel() {
- return channelFuture.getChannel();
+ return channelFuture.channel();
}
@Override
public void close() {
- if(this.channelFuture != null && getChannel().isOpen()) {
- try {
- getChannel().close().awaitUninterruptibly();
--- End diff --
Could you explain why does not need channel.close() ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---