This repository was archived by the owner on Sep 2, 2022. It is now read-only.
File tree 1 file changed +16
-10
lines changed
src/java.base/share/classes/sun/security/ssl
1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -1784,17 +1784,23 @@ private void waitForClose() throws IOException {
1784
1784
SSLLogger .fine ("wait for close_notify or alert" );
1785
1785
}
1786
1786
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 );
1794
1800
}
1795
- } catch (Exception e ) { // including RuntimeException
1796
- handleException (e );
1797
1801
}
1802
+ } finally {
1803
+ appInput .readLock .unlock ();
1798
1804
}
1799
1805
}
1800
1806
}
You can’t perform that action at this time.
0 commit comments