373394: fix for IllegalArgumentException in SelectChannelEndpoint.blockWritable() when wait is called with a negative value.

This commit is contained in:
Thomas Becker 2012-03-06 21:26:46 +01:00 committed by Simone Bordet
parent ffdcfa5dde
commit ff75d9e38a
1 changed files with 3 additions and 3 deletions

View File

@ -385,7 +385,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
try
{
updateKey();
this.wait(timeoutMs>=0?(end-now):10000);
this.wait(timeoutMs>0?(end-now):10000);
}
catch (InterruptedException e)
{
@ -433,7 +433,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
try
{
updateKey();
this.wait(timeoutMs>=0?(end-now):10000);
this.wait(timeoutMs>0?(end-now):10000);
}
catch (InterruptedException e)
{
@ -462,7 +462,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
*/
public void scheduleWrite()
{
if (_writable==true)
if (_writable)
LOG.debug("Required scheduleWrite {}",this);
_writable=false;