changeset 54003:c9f2b71057c1

8219990: Backout JDK-8219658 Reviewed-by: dfuchs
author xuelei
date Fri, 01 Mar 2019 09:42:04 -0800
parents db37ce5664e3
children b31780c0c4c9
files src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;