Fix by checking for the need to call onAllDataRead in unhandle
This commit is contained in:
Greg Wilkins 2017-02-09 23:42:49 +11:00
parent e4028fa4d4
commit e7c0e2b288
2 changed files with 12 additions and 1 deletions

View File

@ -432,7 +432,9 @@ public class HttpChannelState
break;
case STARTED:
if (_asyncRead.isInterested() && _asyncReadPossible)
// If a read is possible and either we are interested in reads or we have
// to call onAllDataRead, then we need a READ_CALLBACK
if (_asyncReadPossible && ( _asyncRead.isInterested() || _channel.getRequest().getHttpInput().isAsyncEOF()))
{
_state=State.ASYNC_IO;
_asyncRead=Interest.NONE;

View File

@ -709,6 +709,14 @@ public class HttpInput extends ServletInputStream implements Runnable
}
}
public boolean isAsyncEOF()
{
synchronized (_inputQ)
{
return _state == AEOF;
}
}
@Override
public boolean isReady()
{
@ -1121,4 +1129,5 @@ public class HttpInput extends ServletInputStream implements Runnable
return "AEOF";
}
};
}