mirror of https://github.com/apache/activemq.git
commit
ac27cc2cda
|
@ -158,9 +158,8 @@ public class AutoInitNioSSLTransport extends NIOSSLTransport {
|
||||||
return readSize;
|
return readSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Prevent concurrent access to SSLEngine
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void serviceRead() {
|
public void serviceRead() {
|
||||||
try {
|
try {
|
||||||
if (handshakeInProgress) {
|
if (handshakeInProgress) {
|
||||||
doHandshake();
|
doHandshake();
|
||||||
|
|
|
@ -243,9 +243,8 @@ public class NIOSSLTransport extends NIOTransport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Prevent concurrent access to SSLEngine
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void serviceRead() {
|
public void serviceRead() {
|
||||||
try {
|
try {
|
||||||
if (handshakeInProgress) {
|
if (handshakeInProgress) {
|
||||||
doHandshake();
|
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) {
|
if (!(inputBuffer.position() != 0 && inputBuffer.hasRemaining()) || status == SSLEngineResult.Status.BUFFER_UNDERFLOW) {
|
||||||
int bytesRead = channel.read(inputBuffer);
|
int bytesRead = channel.read(inputBuffer);
|
||||||
|
|
Loading…
Reference in New Issue