improved timeout handling
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1252 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
083ef60f5e
commit
ea14de47b7
|
@ -286,7 +286,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements Runnable,
|
||||||
updateKey();
|
updateKey();
|
||||||
this.wait(timeoutMs);
|
this.wait(timeoutMs);
|
||||||
|
|
||||||
if (_readBlocked && timeoutMs<(_selectSet.getNow()-start))
|
timeoutMs -= _selectSet.getNow()-start;
|
||||||
|
if (_readBlocked && timeoutMs<=0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InterruptedException e)
|
catch (InterruptedException e)
|
||||||
|
@ -323,7 +324,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements Runnable,
|
||||||
updateKey();
|
updateKey();
|
||||||
this.wait(timeoutMs);
|
this.wait(timeoutMs);
|
||||||
|
|
||||||
if (_writeBlocked && timeoutMs<(_selectSet.getNow()-start))
|
timeoutMs -= _selectSet.getNow()-start;
|
||||||
|
if (_writeBlocked && timeoutMs<=0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (InterruptedException e)
|
catch (InterruptedException e)
|
||||||
|
|
|
@ -377,9 +377,7 @@ public abstract class AbstractConnector extends HttpBuffers implements Connector
|
||||||
{
|
{
|
||||||
try{close();} catch(IOException e) {Log.warn(e);}
|
try{close();} catch(IOException e) {Log.warn(e);}
|
||||||
|
|
||||||
if (_threadPool==_server.getThreadPool())
|
if (_threadPool!=_server.getThreadPool() && _threadPool instanceof LifeCycle)
|
||||||
_threadPool=null;
|
|
||||||
else if (_threadPool instanceof LifeCycle)
|
|
||||||
((LifeCycle)_threadPool).stop();
|
((LifeCycle)_threadPool).stop();
|
||||||
|
|
||||||
super.doStop();
|
super.doStop();
|
||||||
|
|
Loading…
Reference in New Issue