Merge branch 'AMQ-8287' into main

This closes #666
This commit is contained in:
Christopher L. Shannon (cshannon) 2021-06-02 13:52:42 -04:00
commit ac27cc2cda
2 changed files with 4 additions and 5 deletions

View File

@ -158,9 +158,8 @@ public class AutoInitNioSSLTransport extends NIOSSLTransport {
return readSize;
}
//Prevent concurrent access to SSLEngine
@Override
public synchronized void serviceRead() {
public void serviceRead() {
try {
if (handshakeInProgress) {
doHandshake();

View File

@ -243,9 +243,8 @@ public class NIOSSLTransport extends NIOTransport {
}
}
//Prevent concurrent access to SSLEngine
@Override
public synchronized void serviceRead() {
public void serviceRead() {
try {
if (handshakeInProgress) {
doHandshake();
@ -374,7 +373,8 @@ public class NIOSSLTransport extends NIOTransport {
}
}
protected int secureRead(ByteBuffer plain) throws Exception {
//Prevent concurrent access while reading from the channel
protected synchronized int secureRead(ByteBuffer plain) throws Exception {
if (!(inputBuffer.position() != 0 && inputBuffer.hasRemaining()) || status == SSLEngineResult.Status.BUFFER_UNDERFLOW) {
int bytesRead = channel.read(inputBuffer);