Skip to content

Commit 46d52fc

Browse files
committed
fix
1 parent f708e63 commit 46d52fc

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

ratis-common/src/main/java/org/apache/ratis/protocol/exceptions/NettyRpcException.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

ratis-netty/src/main/java/org/apache/ratis/netty/NettyRpcProxy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.apache.ratis.client.RaftClientConfigKeys;
2121
import org.apache.ratis.conf.RaftProperties;
2222
import org.apache.ratis.protocol.RaftPeer;
23-
import org.apache.ratis.protocol.exceptions.NettyRpcException;
23+
import org.apache.ratis.protocol.exceptions.TimeoutIOException;
2424
import org.apache.ratis.thirdparty.io.netty.channel.*;
2525
import org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel;
2626
import org.apache.ratis.thirdparty.io.netty.handler.codec.protobuf.ProtobufDecoder;
@@ -128,7 +128,7 @@ protected void channelRead0(ChannelHandlerContext ctx,
128128

129129
@Override
130130
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
131-
failOutstandingRequests(new NettyRpcException("Caught an exception for the connection to " + peer, cause));
131+
failOutstandingRequests(cause);
132132
client.close();
133133
}
134134

@@ -219,7 +219,7 @@ public RaftNettyServerReplyProto send(
219219
} catch (ExecutionException e) {
220220
throw IOUtils.toIOException(e);
221221
} catch (TimeoutException e) {
222-
throw new NettyRpcException(e.getMessage(), e);
222+
throw new TimeoutIOException(e.getMessage(), e);
223223
}
224224
}
225225
}

0 commit comments

Comments
 (0)