You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by jo...@apache.org on 2021/08/04 18:26:09 UTC
[mina] branch bugfix/DIRMINA1132 updated: ensures that qreceive()
loops when possible
This is an automated email from the ASF dual-hosted git repository.
johnnyv pushed a commit to branch bugfix/DIRMINA1132
in repository https://gitbox.apache.org/repos/asf/mina.git
The following commit(s) were added to refs/heads/bugfix/DIRMINA1132 by this push:
new 5fe18b2 ensures that qreceive() loops when possible
5fe18b2 is described below
commit 5fe18b2f2ebcc1529aea7b53380f95994b679358
Author: Jonathan Valliere <jo...@apache.org>
AuthorDate: Wed Aug 4 14:26:07 2021 -0400
ensures that qreceive() loops when possible
---
.../src/main/java/org/apache/mina/filter/ssl2/SSL2HandlerG0.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mina-core/src/main/java/org/apache/mina/filter/ssl2/SSL2HandlerG0.java b/mina-core/src/main/java/org/apache/mina/filter/ssl2/SSL2HandlerG0.java
index f78c9ef..8b203c8 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/ssl2/SSL2HandlerG0.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/ssl2/SSL2HandlerG0.java
@@ -45,6 +45,9 @@ public class SSL2HandlerG0 extends SSL2Handler {
*/
protected boolean mHandshakeStarted = false;
+ /**
+ * Holds the decoder thread reference
+ */
protected Thread mDecodeThread = null;
/**
@@ -132,8 +135,6 @@ public class SSL2HandlerG0 extends SSL2Handler {
result.bytesConsumed(), result.bytesProduced(), result.getStatus(), result.getHandshakeStatus());
}
- final boolean success = result.bytesConsumed() != 0;
-
if (result.bytesProduced() == 0) {
dest.free();
} else {
@@ -165,7 +166,7 @@ public class SSL2HandlerG0 extends SSL2Handler {
case NEED_UNWRAP:
case NEED_UNWRAP_AGAIN:
case NOT_HANDSHAKING:
- if (success && message.hasRemaining()) {
+ if (result.bytesProduced() != 0 && message.hasRemaining()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("{} qreceive() - trying to decode more messages, looping", toString());
}
@@ -273,7 +274,6 @@ public class SSL2HandlerG0 extends SSL2Handler {
}
return false;
} else {
- source.rewind();
EncryptedWriteRequest encrypted = new EncryptedWriteRequest(dest, request);
this.mAckQueue.add(encrypted);
if (LOGGER.isDebugEnabled()) {