8219990: Backout JDK-8219658

Reviewed-by: dfuchs
This commit is contained in:
Xue-Lei Andrew Fan 2019-03-01 09:42:04 -08:00
parent ed252e10de
commit 4332a3dc56

View file

@ -916,12 +916,8 @@ public final class SSLSocketImpl
/** /**
* Try the best to use up the input records so as to close the * Try the best to use up the input records so as to close the
* socket gracefully, without impact the performance too much. * socket gracefully, without impact the performance too much.
*
* Note: please don't synchronize this method as the read() method
* may hold the lock. A race should be fine as this method is
* designed for cleanup only.
*/ */
private void deplete() { private synchronized void deplete() {
if (!conContext.isInboundClosed()) { if (!conContext.isInboundClosed()) {
if (!(conContext.inputRecord instanceof SSLSocketInputRecord)) { if (!(conContext.inputRecord instanceof SSLSocketInputRecord)) {
return; return;