Index: SocketSessionImpl.java =================================================================== --- SocketSessionImpl.java (revision 391268) +++ SocketSessionImpl.java (working copy) @@ -18,6 +18,9 @@ */ package org.apache.mina.transport.socket.nio.support; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.net.SocketAddress; import java.net.SocketException; import java.nio.channels.SelectionKey; @@ -45,6 +48,8 @@ */ class SocketSessionImpl extends BaseIoSession { + private static final Logger LOG = LoggerFactory.getLogger( SocketSessionImpl.class ); + private final IoService manager; private final SocketSessionConfig config = new SocketSessionConfigImpl(); private final SocketIoProcessor ioProcessor; @@ -342,7 +347,10 @@ } catch( SocketException e ) { - throw new RuntimeIOException( e ); + // SPT 4/4/6 + LOG.warn("Unable to get traffic class hint: " + e ); + return 0; + //throw new RuntimeIOException( e ); } } @@ -354,7 +362,9 @@ } catch( SocketException e ) { - throw new RuntimeIOException( e ); + // SPT 4/4/6 + LOG.warn("Unable to set traffic class hint: " + e ); + //throw new RuntimeIOException( e ); } } @@ -378,7 +388,9 @@ } catch( SocketException e ) { - throw new RuntimeIOException( e ); + // SPT 4/4/6 + LOG.warn("Unable to set send buffer size hint: " + e ); + //throw new RuntimeIOException( e ); } } @@ -403,7 +415,17 @@ } catch( SocketException e ) { - throw new RuntimeIOException( e ); + // SPT 4/4/6 + LOG.warn("Unable to set receive buffer size hint: " + e ); + + // It is what it is... + try{ + SocketSessionImpl.this.readBufferSize = ch.socket().getReceiveBufferSize(); + } + catch( SocketException ignore ) + { + throw new RuntimeIOException( e ); + } } } }