qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r587476 - in /incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina: MinaHandler.java MinaSender.java
Date Tue, 23 Oct 2007 12:28:25 GMT
Author: arnaudsimon
Date: Tue Oct 23 05:28:24 2007
New Revision: 587476

URL: http://svn.apache.org/viewvc?rev=587476&view=rev
Log:
cahnged for handling IO write errors

Modified:
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java?rev=587476&r1=587475&r2=587476&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java
(original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaHandler.java
Tue Oct 23 05:28:24 2007
@@ -88,6 +88,7 @@
     public void exceptionCaught(IoSession ssn, Throwable e)
     {
         log.error(e, "exception caught");
+        throw new RuntimeException("IOException", e);
     }
 
     public void sessionCreated(final IoSession ssn)

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java?rev=587476&r1=587475&r2=587476&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java
(original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/transport/network/mina/MinaSender.java
Tue Oct 23 05:28:24 2007
@@ -50,6 +50,10 @@
     {
         synchronized (lock)
         {
+            if( session.isClosing())
+            {
+                throw new RuntimeException("Trying to write on a closed socket");
+            }
             lastWrite = session.write(ByteBuffer.wrap(buf));
         }
     }



Mime
View raw message