File tree 1 file changed +15
-9
lines changed
src/java.base/share/classes/sun/security/ssl
1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -1803,17 +1803,23 @@ private void waitForClose() throws IOException {
1803
1803
SSLLogger .fine ("wait for close_notify or alert" );
1804
1804
}
1805
1805
1806
- while (!conContext .isInboundClosed ()) {
1807
- try {
1808
- Plaintext plainText = decode (null );
1809
- // discard and continue
1810
- if (SSLLogger .isOn && SSLLogger .isOn ("ssl" )) {
1811
- SSLLogger .finest (
1812
- "discard plaintext while waiting for close" , plainText );
1806
+ appInput .readLock .lock ();
1807
+ try {
1808
+ while (!conContext .isInboundClosed ()) {
1809
+ try {
1810
+ Plaintext plainText = decode (null );
1811
+ // discard and continue
1812
+ if (SSLLogger .isOn && SSLLogger .isOn ("ssl" )) {
1813
+ SSLLogger .finest (
1814
+ "discard plaintext while waiting for close" ,
1815
+ plainText );
1816
+ }
1817
+ } catch (Exception e ) { // including RuntimeException
1818
+ handleException (e );
1813
1819
}
1814
- } catch (Exception e ) { // including RuntimeException
1815
- handleException (e );
1816
1820
}
1821
+ } finally {
1822
+ appInput .readLock .unlock ();
1817
1823
}
1818
1824
}
1819
1825
}
You can’t perform that action at this time.
0 commit comments