directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r412632 - /directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Date Thu, 08 Jun 2006 02:20:26 GMT
Author: trustin
Date: Wed Jun  7 19:20:25 2006
New Revision: 412632

URL: http://svn.apache.org/viewvc?rev=412632&view=rev
Log:
Fixed a problem that write future doesn't work when ProtocolEncoderOutput.flush() is invoked.

Modified:
    directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java?rev=412632&r1=412631&r2=412632&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Wed Jun  7 19:20:25 2006
@@ -224,6 +224,7 @@
         
         try
         {
+            encoderOut.writeRequest = writeRequest;
             encoder.encode( session, message, encoderOut );
         }
         catch( Throwable t )
@@ -241,15 +242,15 @@
         }
         finally
         {
+            encoderOut.flush();
+            encoderOut.writeRequest = null;
+
             // Dispose the encoder if this session is connectionless.
             if( session.getTransportType().isConnectionless() )
             {
                 disposeEncoder( session );
             }
         }
-
-        encoderOut.writeRequest = writeRequest;
-        encoderOut.flush();
     }
     
     public void sessionClosed( NextFilter nextFilter, IoSession session ) throws Exception



Mime
View raw message