activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r465219 - /incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs
Date Wed, 18 Oct 2006 11:33:53 GMT
Author: jstrachan
Date: Wed Oct 18 04:33:52 2006
New Revision: 465219

URL: http://svn.apache.org/viewvc?view=rev&rev=465219
Log:
Applied fix for AMQ-988 to avoid reusing a single NetworkStream cnocurrently for reading and
writing which seems to fix some lockups after long term use

Modified:
    incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs

Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs?view=diff&rev=465219&r1=465218&r2=465219
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs
(original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Transport/Tcp/TcpTransport.cs
Wed Oct 18 04:33:52 2006
@@ -63,9 +63,10 @@
 
                 started = true;
                 
-                NetworkStream networkStream = new NetworkStream(socket);
-                socketWriter = new OpenWireBinaryWriter(networkStream);
-                socketReader = new OpenWireBinaryReader(networkStream);
+                // As reported in AMQ-988 it appears that NetworkStream is not thread safe
+                // so lets use an instance for each of the 2 streams
+                socketWriter = new OpenWireBinaryWriter(new NetworkStream(socket));
+                socketReader = new OpenWireBinaryReader(new NetworkStream(socket));
                 
                 // now lets create the background read thread
                 readThread = new Thread(new ThreadStart(ReadLoop));



Mime
View raw message