mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 11:29:29 +00:00
349896 SCEP supports zero maxIdleTime
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3408 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
7e89f9afde
commit
aa990479f6
@ -169,13 +169,13 @@ public interface EndPoint
|
||||
* the {@link java.net.Socket#getSoTimeout()} for blocking connections,
|
||||
* but {@link AsyncEndPoint} implementations must use other mechanisms
|
||||
* to implement the max idle time.
|
||||
* @return the max idle time in ms.
|
||||
* @return the max idle time in ms or if ms <= 0 implies an infinite timeout
|
||||
*/
|
||||
public int getMaxIdleTime();
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Set the max idle time.
|
||||
* @param timeMs the max idle time in MS.
|
||||
* @param timeMs the max idle time in MS. Timeout <= 0 implies an infinite timeout
|
||||
* @throws IOException if the timeout cannot be set.
|
||||
*/
|
||||
public void setMaxIdleTime(int timeMs) throws IOException;
|
||||
|
@ -326,7 +326,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
||||
try
|
||||
{
|
||||
updateKey();
|
||||
this.wait(end-now);
|
||||
this.wait(timeoutMs>=0?(end-now):10000);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
@ -337,7 +337,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
||||
now=_selectSet.getNow();
|
||||
}
|
||||
|
||||
if (_readBlocked && now>=end)
|
||||
if (_readBlocked && timeoutMs>0 && now>=end)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -371,7 +371,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
||||
try
|
||||
{
|
||||
updateKey();
|
||||
this.wait(end-now);
|
||||
this.wait(timeoutMs>=0?(end-now):10000);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
@ -381,7 +381,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
||||
{
|
||||
now=_selectSet.getNow();
|
||||
}
|
||||
if (_writeBlocked && now>=end)
|
||||
if (_writeBlocked && timeoutMs>0 && now>=end)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user