Author: markt
Date: Tue Sep 10 11:47:30 2013
New Revision: 1521440
URL: http://svn.apache.org/r1521440
Log:
Fix Comet unit test failures on OSX. OSX requires timeout of 0 for non-blocking
read
Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1521440&r1=1521439&r2=1521440&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Tue
Sep 10 11:47:30 2013
@@ -638,7 +638,12 @@ public class InternalAprInputBuffer exte
writeLock.lock();
wrapper.setBlockingStatus(block);
// Set the current settings for this socket
- Socket.optSet(socket, Socket.APR_SO_NONBLOCK, (block ? 0 : 1));
+ if (block) {
+ Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 0);
+ } else {
+ Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 1);
+ Socket.timeoutSet(socket, 0);
+ }
// Downgrade the lock
try {
readLock.lock();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]