tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johno Crawford <johno.crawf...@sulake.com>
Subject Re: svn commit: r1295978 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11NioProtocol.java upgrade/UpgradeNioProcessor.java
Date Thu, 01 Mar 2012 23:42:38 GMT
On 2/03/2012 12:05 AM, fhanik@apache.org wrote:
> Author: fhanik
> Date: Thu Mar  1 23:05:51 2012
> New Revision: 1295978
>
> URL: http://svn.apache.org/viewvc?rev=1295978&view=rev
> Log:
> Fix WebSocket's non blocking call
> http://tomcat.markmail.org/thread/drj7zgq2csfdnvoh#query:+page:1+mid:y4dheqpm2wx5xzba+state:results

Looks like the same usage in 
org.apache.coyote.http11.Http11NioProtocol.Http11ConnectionHandler#longPoll 
?
>
>
> Modified:
>      tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
>      tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java
>
> Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1295978&r1=1295977&r2=1295978&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Thu Mar  1 23:05:51
2012
> @@ -296,12 +296,7 @@ public class Http11NioProtocol extends A
>           protected void upgradePoll(SocketWrapper<NioChannel>  socket,
>                   Processor<NioChannel>  processor) {
>               connections.put(socket.getSocket(), processor);
> -
> -            SelectionKey key = socket.getSocket().getIOChannel().keyFor(
> -                    socket.getSocket().getPoller().getSelector());
> -            key.interestOps(SelectionKey.OP_READ);
> -            ((KeyAttachment) socket).interestOps(
> -                    SelectionKey.OP_READ);
> +            socket.getSocket().getPoller().add(socket.getSocket());
>           }
>       }
>   }
>
> Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java?rev=1295978&r1=1295977&r2=1295978&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java Thu Mar
 1 23:05:51 2012
> @@ -104,12 +104,10 @@ public class UpgradeNioProcessor extends
>       @Override
>       public int read(boolean block, byte[] bytes, int off, int len)
>               throws IOException {
> -        // TODO Implement non-blocking reads. Should be as simple as replacing
> -        // true with block in the two lines below
>           if (len>  maxRead) {
> -            return readSocket(true, bytes, off, maxRead);
> +            return readSocket(block, bytes, off, maxRead);
>           } else {
> -            return readSocket(true, bytes, off, len);
> +            return readSocket(block, bytes, off, len);
>           }
>       }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message