Skip to content

Commit

Permalink
Revert "[fix](SSL) Correctly close SSL connections (apache#38587)"
Browse files Browse the repository at this point in the history
This reverts commit a03a1c2.
  • Loading branch information
TangSiyang2001 committed Aug 12, 2024
1 parent 9b9deb3 commit 35f5e90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public ByteBuffer fetchOnePacket() throws IOException {
// before read, set limit to make read only one packet
result.limit(result.position() + packetLen);
readLen = readAll(result, false);
if (isSslMode && remainingBuffer.position() == 0 && result.hasRemaining()) {
if (isSslMode && remainingBuffer.position() == 0) {
byte[] header = result.array();
int packetId = header[3] & 0xFF;
if (packetId != sequenceId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,6 @@ public void processOnce() throws IOException {
LOG.warn("Null packet received from network. remote: {}", channel.getRemoteHostPortString());
throw new IOException("Error happened when receiving packet.");
}
if (!packetBuf.hasRemaining()) {
LOG.info("No more data to be read. Close connection. remote={}", channel.getRemoteHostPortString());
ctx.setKilled();
return;
}
} catch (AsynchronousCloseException e) {
// when this happened, timeout checker close this channel
// killed flag in ctx has been already set, just return
Expand Down

0 comments on commit 35f5e90

Please sign in to comment.