qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1539558 - in /qpid/trunk/qpid/java: amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java
Date Thu, 07 Nov 2013 08:50:31 GMT
Author: rgodfrey
Date: Thu Nov  7 08:50:31 2013
New Revision: 1539558

URL: http://svn.apache.org/r1539558
Log:
QPID-5294 : Thread deadlock due to simultaneous calls to write and close on SSLSocket (JVM
bug JDK-8022788)

Modified:
    qpid/trunk/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java
    qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java

Modified: qpid/trunk/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java?rev=1539558&r1=1539557&r2=1539558&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Connection.java
Thu Nov  7 08:50:31 2013
@@ -264,7 +264,10 @@ public class Connection implements Socke
                         {
                             try
                             {
-                                s.close();
+                                synchronized (outputStream)
+                                {
+                                    s.close();
+                                }
                             }
                             catch (IOException e)
                             {

Modified: qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java?rev=1539558&r1=1539557&r2=1539558&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java
(original)
+++ qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/framing/ConnectionHandler.java
Thu Nov  7 08:50:31 2013
@@ -417,7 +417,10 @@ public class ConnectionHandler
                     Binary bin = new Binary(buf.array(),buf.arrayOffset()+buf.position(),
buf.limit()-buf.position());
                     RAW_LOGGER.fine("SEND["+ _conn.getRemoteAddress() +"] : " + bin.toString());
                 }
-                _outputStream.write(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
+                synchronized (_outputStream)
+                {
+                    _outputStream.write(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
+                }
                 buf.position(buf.limit());
             }
             catch (IOException e)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message