Community
Participate
Working Groups
The method SelectChannelConnector.close() does not work properly. According to the documentation [1], as well as the behaviour of the SocketConnector class, this method should only close the server socket without affecting any existing connections that have already been established. The the close() method does too much work. It stops the SelectorManager, which in turn stops all the SelectSets. To fix the problem, the stopping of the SelectorManager should be moved to the SelectChannelConnector.doStop() method just before calling super.doStop(). The methods can be changed to: public synchronized void close() throws IOException { if (_acceptChannel != null) _acceptChannel.close(); _acceptChannel = null; _localPort = -2; } @Override protected synchronized void doStop() throws Exception { if (_manager.isRunning()) { try { _manager.stop(); } catch (Exception e) { Log.warn(e); } } super.doStop(); } [1] http://docs.codehaus.org/display/JETTY/How+to+gracefully+shutdown
Created attachment 199152 [details] Proposed Test Harness Attached is the proposed test harness. It eventually will become a base class for the test harnesses for different types of connectors.
Created attachment 199155 [details] Updated test harness New version of test harness. Connector is now closed between pipelined requests in addition to between chunks.
Committed 2011-07-07. Need to take a second look at the test harness to make it computer speed-independent. Right now it uses the timeouts that are too small if computer is too busy or too slow.
Improved test harness has been committed for Jetty v7.5.0.