Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x

This commit is contained in:
Greg Wilkins 2016-06-22 17:37:16 +10:00
commit 7bc427ce79
2 changed files with 5 additions and 13 deletions

View File

@ -12,10 +12,10 @@
<!-- =========================================================== --> <!-- =========================================================== -->
<Set name="RequestLog"> <Set name="RequestLog">
<New id="RequestLog" class="org.eclipse.jetty.server.AsyncNCSARequestLog"> <New id="RequestLog" class="org.eclipse.jetty.server.AsyncNCSARequestLog">
<Set name="filename"><Property name="jetty.base" default="." /><Property> <Set name="filename"><Property name="jetty.base" default="." />/<Property>
<Name>jetty.requestlog.filePath</Name> <Name>jetty.requestlog.filePath</Name>
<Deprecated>requestlog.filename</Deprecated> <Deprecated>requestlog.filename</Deprecated>
<Default><Property name="jetty.requestlog.dir" default="/logs"/>/yyyy_mm_dd.request.log</Default> <Default><Property name="jetty.requestlog.dir" default="logs"/>/yyyy_mm_dd.request.log</Default>
</Property> </Property>
</Set> </Set>
<Set name="filenameDateFormat"><Property name="jetty.requestlog.filenameDateFormat" deprecated="requestlog.filenameDateFormat" default="yyyy_MM_dd"/></Set> <Set name="filenameDateFormat"><Property name="jetty.requestlog.filenameDateFormat" deprecated="requestlog.filenameDateFormat" default="yyyy_MM_dd"/></Set>

View File

@ -323,7 +323,6 @@ public class HttpChannelState
protected Action unhandle() protected Action unhandle()
{ {
Action action; Action action;
AsyncContextEvent schedule_event=null;
boolean read_interested=false; boolean read_interested=false;
try(Locker.Lock lock= _locker.lock()) try(Locker.Lock lock= _locker.lock())
@ -379,10 +378,12 @@ public class HttpChannelState
} }
else else
{ {
schedule_event=_event;
read_interested=_asyncReadUnready; read_interested=_asyncReadUnready;
_state=State.ASYNC_WAIT; _state=State.ASYNC_WAIT;
action=Action.WAIT; action=Action.WAIT;
Scheduler scheduler = _channel.getScheduler();
if (scheduler!=null && _timeoutMs>0)
_event.setTimeoutTask(scheduler.schedule(_event,_timeoutMs,TimeUnit.MILLISECONDS));
} }
break; break;
@ -418,8 +419,6 @@ public class HttpChannelState
} }
} }
if (schedule_event!=null)
scheduleTimeout(schedule_event);
if (read_interested) if (read_interested)
_channel.asyncReadFillInterested(); _channel.asyncReadFillInterested();
return action; return action;
@ -890,13 +889,6 @@ public class HttpChannelState
_channel.execute(_channel); _channel.execute(_channel);
} }
protected void scheduleTimeout(AsyncContextEvent event)
{
Scheduler scheduler = _channel.getScheduler();
if (scheduler!=null && _timeoutMs>0)
event.setTimeoutTask(scheduler.schedule(event,_timeoutMs,TimeUnit.MILLISECONDS));
}
protected void cancelTimeout() protected void cancelTimeout()
{ {
final AsyncContextEvent event; final AsyncContextEvent event;