This repository was archived by the owner on Sep 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
src/java.base/share/classes/sun/security/ssl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1996, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1996, 2021 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -1784,17 +1784,23 @@ private void waitForClose() throws IOException {
17841784 SSLLogger .fine ("wait for close_notify or alert" );
17851785 }
17861786
1787- while (!conContext .isInboundClosed ()) {
1788- try {
1789- Plaintext plainText = decode (null );
1790- // discard and continue
1791- if (SSLLogger .isOn && SSLLogger .isOn ("ssl" )) {
1792- SSLLogger .finest (
1793- "discard plaintext while waiting for close" , plainText );
1787+ appInput .readLock .lock ();
1788+ try {
1789+ while (!conContext .isInboundClosed ()) {
1790+ try {
1791+ Plaintext plainText = decode (null );
1792+ // discard and continue
1793+ if (SSLLogger .isOn && SSLLogger .isOn ("ssl" )) {
1794+ SSLLogger .finest (
1795+ "discard plaintext while waiting for close" ,
1796+ plainText );
1797+ }
1798+ } catch (Exception e ) { // including RuntimeException
1799+ handleException (e );
17941800 }
1795- } catch (Exception e ) { // including RuntimeException
1796- handleException (e );
17971801 }
1802+ } finally {
1803+ appInput .readLock .unlock ();
17981804 }
17991805 }
18001806}
You can’t perform that action at this time.
0 commit comments