mirror of
https://github.com/apache/activemq.git
synced 2025-02-27 04:46:38 +00:00
AMQ-8169: Synchronize on serviceRead inside NIOSSLTransport
This is needed to prevent concurrent access to the SSLEngine during initialization. This is a regression from when auto+nio+ssl was added. (cherry picked from commit 1654e6c79cfbc1ced5a8fa3f726a9f651560be9d)
This commit is contained in:
parent
6d82e628f7
commit
8d34120d93
@ -158,8 +158,9 @@ public class AutoInitNioSSLTransport extends NIOSSLTransport {
|
||||
return readSize;
|
||||
}
|
||||
|
||||
//Prevent concurrent access to SSLEngine
|
||||
@Override
|
||||
public void serviceRead() {
|
||||
public synchronized void serviceRead() {
|
||||
try {
|
||||
if (handshakeInProgress) {
|
||||
doHandshake();
|
||||
|
@ -243,8 +243,9 @@ public class NIOSSLTransport extends NIOTransport {
|
||||
}
|
||||
}
|
||||
|
||||
//Prevent concurrent access to SSLEngine
|
||||
@Override
|
||||
public void serviceRead() {
|
||||
public synchronized void serviceRead() {
|
||||
try {
|
||||
if (handshakeInProgress) {
|
||||
doHandshake();
|
||||
|
Loading…
x
Reference in New Issue
Block a user