changeset 6537:36e578297fa7

8013809: deadlock in SSLSocketImpl between between write and close Reviewed-by: wetmore
author xuelei
date Mon, 12 Aug 2013 02:34:25 -0700
parents 4bcbfcaf74c7
children 1afb03696eb7 c0728c8070a2
files src/share/classes/sun/security/ssl/SSLSocketImpl.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Fri Aug 09 13:51:24 2013 +0400
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Aug 12 02:34:25 2013 -0700
@@ -172,7 +172,7 @@
     /*
      * Drives the protocol state machine.
      */
-    private int                 connectionState;
+    private volatile int        connectionState;
 
     /*
      * Flag indicating if the next record we receive MUST be a Finished
@@ -1443,7 +1443,7 @@
      * Return whether the socket has been explicitly closed by the application.
      */
     public boolean isClosed() {
-        return getConnectionState() == cs_APP_CLOSED;
+        return connectionState == cs_APP_CLOSED;
     }
 
     /**