< prev index next >

src/java.base/share/classes/sun/security/ssl/TransportContext.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 494,513 **** } } } if (needCloseNotify) { ! outputRecord.recordLock.lock(); ! try { try { // send a close_notify alert warning(Alert.CLOSE_NOTIFY); } finally { outputRecord.close(); } - } finally { - outputRecord.recordLock.unlock(); } } } } --- 494,510 ---- } } } if (needCloseNotify) { ! synchronized (outputRecord) { try { // send a close_notify alert warning(Alert.CLOSE_NOTIFY); } finally { outputRecord.close(); } } } } }
*** 542,553 **** useUserCanceled = true; } // Need a lock here so that the user_canceled alert and the // close_notify alert can be delivered together. ! outputRecord.recordLock.lock(); ! try { try { // send a user_canceled alert if needed. if (useUserCanceled) { warning(Alert.USER_CANCELED); } --- 539,549 ---- useUserCanceled = true; } // Need a lock here so that the user_canceled alert and the // close_notify alert can be delivered together. ! synchronized (outputRecord) { try { // send a user_canceled alert if needed. if (useUserCanceled) { warning(Alert.USER_CANCELED); }
*** 555,566 **** // send a close_notify alert warning(Alert.CLOSE_NOTIFY); } finally { outputRecord.close(); } - } finally { - outputRecord.recordLock.unlock(); } } // Note; HandshakeStatus.FINISHED status is retrieved in other places. HandshakeStatus getHandshakeStatus() { --- 551,560 ----
< prev index next >