Catch and handle RuntimeException: Could not generate DH keypair
@@ -259,6 +259,10 @@ public final class AsyncSslSocket implements AsyncTcpSocket, AsyncTcpSocket.Even
} catch (SSLException e) {
dstBuf.recycle();
throw e;
+ } catch (RuntimeException e) {
+ // https://bugs.openjdk.java.net/browse/JDK-8072452
+ dstBuf.recycle();
+ throw new SSLException(e);
}
app2engine.ofReadByteBuffer(srcBuffer);
