directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r164491 - /directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
Date Sun, 24 Apr 2005 17:31:48 GMT
Author: trustin
Date: Sun Apr 24 10:31:47 2005
New Revision: 164491

URL: http://svn.apache.org/viewcvs?rev=164491&view=rev
Log:
Fixed: SocketIoProcessor drops dataRead event when connection is closed by client.

Modified:
    directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java

Modified: directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java?rev=164491&r1=164490&r2=164491&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/io/socket/SocketIoProcessor.java Sun
Apr 24 10:31:47 2005
@@ -258,17 +258,15 @@
             session.increaseReadBytes( readBytes );
             session.setIdle( IdleStatus.BOTH_IDLE, false );
             session.setIdle( IdleStatus.READER_IDLE, false );
-            if( ret >= 0 )
+
+            if( readBytes > 0 )
             {
-                if( readBytes > 0 )
-                {
-                    ByteBuffer newBuf = ByteBuffer.allocate( readBytes );
-                    newBuf.put( buf );
-                    newBuf.flip();
-                    session.getFilters().dataRead( session, newBuf );
-                }
+                ByteBuffer newBuf = ByteBuffer.allocate( readBytes );
+                newBuf.put( buf );
+                newBuf.flip();
+                session.getFilters().dataRead( session, newBuf );
             }
-            else
+            if( ret < 0 )
             {
                 scheduleRemove( session );
             }



Mime
View raw message