On 12/07/2012 21:42, Filip Hanik (mailing lists) wrote: > You are correct, I was chasing down the following: > > Testsuite: org.apache.catalina.websocket.TestWebSocket > Tests run: 6, Failures: 1, Errors: 0, Time elapsed: 2.048 sec > .... > INFO: Starting ProtocolHandler ["http-nio-127.0.0.1-auto-2-9027"] > Jul 12, 2012 11:56:27 AM > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process > SEVERE: null > java.lang.IllegalArgumentException: Negative timeout > at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) > at > org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:267) > at > org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:227) > at > org.apache.coyote.http11.upgrade.UpgradeNioProcessor.readSocket(UpgradeNioProcessor.java:139) > at > org.apache.coyote.http11.upgrade.UpgradeNioProcessor.read(UpgradeNioProcessor.java:112) > at org.apache.catalina.websocket.WsFrame.nextFrame(WsFrame.java:213) > at > org.apache.catalina.websocket.WsInputStream.nextFrame(WsInputStream.java:68) > at > org.apache.catalina.websocket.StreamInbound.onData(StreamInbound.java:117) > at > org.apache.coyote.http11.upgrade.UpgradeProcessor.upgradeDispatch(UpgradeProcessor.java:83) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) > at > org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1676) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > > We should not use -1 in our unit tests. I'm tempted to get rid of the -1 > notion all together, no sane person should ever use no timeout :)
I do remember that the interpretation of -1 varied across the connectors and I spent some time going through them making the handing consistent. Looks like I missed a case there. Sorry. There was a requirement for infinite timeouts from multiple WebSockets users so I think they'll have to stay (much as I'd like to get rid of them). Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org