Skip to content

Commit 71e0fe2

Browse files
committed
exception type fix
1 parent ae56c1c commit 71e0fe2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryIoSession.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ <T> T readMessage() throws IgniteCheckedException, IOException {
170170
if (MESSAGE_SERIALIZATION != serMode) {
171171
detectSslAlert(serMode, in);
172172

173-
throw new IgniteCheckedException("Received unexpected byte while reading discovery message: " + serMode);
173+
// There are many `X.hasCause` in the discovery errors processing which change connection recovery processing.
174+
// It is better to throw an IOException on reading failures. Often happens at nodes stop and streams closing.
175+
throw new IOException("Received unexpected byte while reading discovery message: " + serMode);
174176
}
175177

176178
byte b0 = (byte)in.read();

0 commit comments

Comments
 (0)