8219990: Backout JDK-8219658
authorxuelei
Fri, 01 Mar 2019 09:42:04 -0800
changeset 53974 c9f2b71057c1
parent 53973 db37ce5664e3
child 53975 b31780c0c4c9
8219990: Backout JDK-8219658 Reviewed-by: dfuchs
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;