# HG changeset patch # User xuelei # Date 1551462124 28800 # Node ID c9f2b71057c1c8b1f50ea296c34f0fb5ffabdf4a # Parent db37ce5664e30365961eedbf5feb035e3ed91088 8219990: Backout JDK-8219658 Reviewed-by: dfuchs diff -r db37ce5664e3 -r c9f2b71057c1 src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java --- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Fri Mar 01 17:48:53 2019 +0100 +++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Fri Mar 01 09:42:04 2019 -0800 @@ -916,12 +916,8 @@ /** * Try the best to use up the input records so as to close the * 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.inputRecord instanceof SSLSocketInputRecord)) { return;