Fixes #624
This commit is contained in:
parent
baae86fcef
commit
59540f552c
|
@ -320,7 +320,6 @@ public class HttpChannelState
|
|||
protected Action unhandle()
|
||||
{
|
||||
Action action;
|
||||
AsyncContextEvent schedule_event=null;
|
||||
boolean read_interested=false;
|
||||
|
||||
if(DEBUG)
|
||||
|
@ -378,17 +377,17 @@ public class HttpChannelState
|
|||
}
|
||||
else
|
||||
{
|
||||
schedule_event=_event;
|
||||
read_interested=_asyncReadUnready;
|
||||
_state=State.ASYNC_WAIT;
|
||||
action=Action.WAIT;
|
||||
scheduleTimeout();
|
||||
}
|
||||
break;
|
||||
|
||||
case EXPIRING:
|
||||
schedule_event=_event;
|
||||
_state=State.ASYNC_WAIT;
|
||||
action=Action.WAIT;
|
||||
scheduleTimeout();
|
||||
break;
|
||||
|
||||
case ERRORING:
|
||||
|
@ -414,8 +413,6 @@ public class HttpChannelState
|
|||
}
|
||||
}
|
||||
|
||||
if (schedule_event!=null)
|
||||
scheduleTimeout(schedule_event);
|
||||
if (read_interested)
|
||||
_channel.asyncReadFillInterested();
|
||||
return action;
|
||||
|
@ -751,11 +748,13 @@ public class HttpChannelState
|
|||
_channel.execute(_channel);
|
||||
}
|
||||
|
||||
protected void scheduleTimeout(AsyncContextEvent event)
|
||||
protected void scheduleTimeout()
|
||||
{
|
||||
if (!_locker.isLocked())
|
||||
throw new IllegalStateException();
|
||||
Scheduler scheduler = _channel.getScheduler();
|
||||
if (scheduler!=null && _timeoutMs>0)
|
||||
event.setTimeoutTask(scheduler.schedule(event,_timeoutMs,TimeUnit.MILLISECONDS));
|
||||
_event.setTimeoutTask(scheduler.schedule(_event,_timeoutMs,TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
protected void cancelTimeout()
|
||||
|
|
Loading…
Reference in New Issue