Added ASYNC_WOKEN state to HttpChannelState

This commit is contained in:
Greg Wilkins 2014-04-30 22:13:24 +02:00
parent 40c352b25c
commit 30652825fa
2 changed files with 11 additions and 4 deletions

View File

@ -184,8 +184,6 @@ public class HttpChannelState
case COMPLETED: case COMPLETED:
return Action.WAIT; return Action.WAIT;
case ASYNC_WAIT:
LOG.warn("How did I get here?", new Throwable());
case ASYNC_WOKEN: case ASYNC_WOKEN:
if (_asyncRead) if (_asyncRead)
{ {
@ -219,6 +217,7 @@ public class HttpChannelState
_async=null; _async=null;
return Action.ASYNC_EXPIRED; return Action.ASYNC_EXPIRED;
case STARTED: case STARTED:
// TODO
if (DEBUG) if (DEBUG)
LOG.debug("TODO Fix this double dispatch",new IllegalStateException(this LOG.debug("TODO Fix this double dispatch",new IllegalStateException(this
.getStatusString())); .getStatusString()));
@ -361,9 +360,17 @@ public class HttpChannelState
case ASYNC_IO: case ASYNC_IO:
dispatch=false; dispatch=false;
break; break;
default: case ASYNC_WAIT:
_state=State.ASYNC_WOKEN;
dispatch=true; dispatch=true;
break; break;
case ASYNC_WOKEN:
dispatch=false;
break;
default:
LOG.warn("async dispatched when complete {}",this);
dispatch=false;
break;
} }
} }

View File

@ -222,7 +222,7 @@ public class SharedBlockingCallback
if (_state == IDLE) if (_state == IDLE)
throw new IllegalStateException("IDLE"); throw new IllegalStateException("IDLE");
if (_state == null) if (_state == null)
LOG.warn(new Throwable()); LOG.debug("Blocker not complete",new Throwable());
} }
finally finally
{ {