Author: remm Date: Thu Sep 3 13:22:02 2015 New Revision: 1701016 URL: http://svn.apache.org/r1701016 Log: Blocking mode doesn't work for me with APR in some cases if the nonblock option isn't set as well.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1701016&r1=1701015&r2=1701016&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Sep 3 13:22:02 2015 @@ -2448,8 +2448,10 @@ public class AprEndpoint extends Abstrac // Set the current settings for this socket setBlockingStatus(block); if (block) { + Socket.optSet(getSocket().longValue(), Socket.APR_SO_NONBLOCK, 0); Socket.timeoutSet(getSocket().longValue(), getReadTimeout() * 1000); } else { + Socket.optSet(getSocket().longValue(), Socket.APR_SO_NONBLOCK, 1); Socket.timeoutSet(getSocket().longValue(), 0); } // Downgrade the lock @@ -2567,8 +2569,10 @@ public class AprEndpoint extends Abstrac // Set the current settings for this socket setBlockingStatus(block); if (block) { + Socket.optSet(getSocket().longValue(), Socket.APR_SO_NONBLOCK, 0); Socket.timeoutSet(getSocket().longValue(), getWriteTimeout() * 1000); } else { + Socket.optSet(getSocket().longValue(), Socket.APR_SO_NONBLOCK, 1); Socket.timeoutSet(getSocket().longValue(), 0); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org