More synchronization to avoid 'missing algorithm' error (not sure ..)

This commit is contained in:
Trustin Lee 2008-11-16 17:59:27 +00:00
parent d0964a4b46
commit 87cd22b5fd

View File

@ -438,7 +438,13 @@ public class SslHandler extends FrameDecoder {
SSLEngineResult result;
try {
result = engine.wrap(outAppBuf, outNetBuf);
if (handshaking || needsFirstHandshake) {
synchronized (handshakeLock) {
result = engine.wrap(outAppBuf, outNetBuf);
}
} else {
result = engine.wrap(outAppBuf, outNetBuf);
}
} finally {
if (!outAppBuf.hasRemaining()) {
pendingUnencryptedWrites.remove();