Skip to content

Commit 63c178f

Browse files
committed
5
1 parent 4609192 commit 63c178f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,9 @@ private boolean handleWrapResult(SSLEngineResult sslEngineResult) throws SSLExce
626626
encryptNetData = newBuffer;
627627
// retry the operation.
628628
return false;
629-
// when wrap BUFFER_UNDERFLOW and other status will not appear.
630629
case BUFFER_UNDERFLOW:
630+
// Rare case: need more input data. Return false to retry.
631+
return false;
631632
default:
632633
throw new IllegalStateException("invalid wrap status: " + sslEngineResult.getStatus());
633634
}
@@ -652,8 +653,10 @@ private boolean handleUnwrapResult(SSLEngineResult sslEngineResult) throws SSLEx
652653
// retry the operation.
653654
return false;
654655
case BUFFER_UNDERFLOW:
656+
// Need more data from network, return false to read more.
657+
return false;
655658
default:
656-
throw new IllegalStateException("invalid wrap status: " + sslEngineResult.getStatus());
659+
throw new IllegalStateException("invalid unwrap status: " + sslEngineResult.getStatus());
657660
}
658661
}
659662

0 commit comments

Comments
 (0)