Issue #1418 updates after review

This commit is contained in:
Greg Wilkins 2017-03-31 08:43:15 +11:00
parent 7a6f2860e1
commit 50c5e7c93e
2 changed files with 2 additions and 20 deletions

View File

@ -1147,6 +1147,7 @@ public class HttpChannelState
switch(_asyncRead)
{
case IDLE:
case READY:
if (_state==State.ASYNC_WAIT)
{
interested=true;
@ -1165,7 +1166,6 @@ public class HttpChannelState
break;
case AVAILABLE:
case READY:
throw new IllegalStateException(toStringLocked());
}
}
@ -1284,21 +1284,6 @@ public class HttpChannelState
}
return woken;
}
/**
* Called to signal that application has called read.
* @return true if woken
*/
public void onRead(boolean available)
{
try(Locker.Lock lock= _locker.lock())
{
if (LOG.isDebugEnabled())
LOG.debug("onRead {} {}",available,toStringLocked());
_asyncRead=available?AsyncRead.AVAILABLE:AsyncRead.IDLE;
}
}
/**
* Called to signal that a read has read -1.

View File

@ -296,9 +296,7 @@ public class HttpInput extends ServletInputStream implements Runnable
// Consume any following poison pills
if (item.isEmpty())
_channelState.onRead(nextInterceptedContent()!=null);
else
_channelState.onRead(true);
nextInterceptedContent();
break;
}
@ -307,7 +305,6 @@ public class HttpInput extends ServletInputStream implements Runnable
{
// Not blocking, so what should we return?
l = _state.noContent();
_channelState.onRead(false);
if (l<0)
// If EOF do we need to wake for allDataRead callback?