directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r371296 - /directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
Date Sun, 22 Jan 2006 14:04:26 GMT
Author: trustin
Date: Sun Jan 22 06:04:23 2006
New Revision: 371296

URL: http://svn.apache.org/viewcvs?rev=371296&view=rev
Log:
SocketConnector accepts negative linger values now.

Modified:
    directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java

Modified: directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java?rev=371296&r1=371295&r2=371296&view=diff
==============================================================================
--- directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
(original)
+++ directory/sandbox/trustin/mina-spi/core/src/main/java/org/apache/mina/transport/socket/nio/SocketConnector.java
Sun Jan 22 06:04:23 2006
@@ -173,7 +173,15 @@
             }
             else
             {
-                ch.socket().setSoLinger( true, Integer.parseInt( val ) );
+                int linger = Integer.parseInt( val );
+                if( linger < 0 )
+                {
+                    ch.socket().setSoLinger( false, 0 );
+                }
+                else
+                {
+                    ch.socket().setSoLinger( true, linger );
+                }
             }
         }
         if( props.containsKey( Constants.NO_DELAY ) )



Mime
View raw message