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:
Greg Wilkins 2011-06-21 04:09:30 +00:00
parent 7e89f9afde
commit aa990479f6
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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;
}
}