Fix #5605 Unblock non container Threads
Don't consumeAll before upgrade
This commit is contained in:
parent
a110fc3468
commit
a100d80d26
|
@ -376,17 +376,15 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
@Override
|
||||
public void onCompleted()
|
||||
{
|
||||
boolean complete = _input.consumeAll();
|
||||
Throwable cancelled = getEndPoint().cancelFillInterest(_input::getError);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("cancelled {}", this, cancelled);
|
||||
|
||||
// Handle connection upgrades
|
||||
if (_channel.getResponse().getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101)
|
||||
{
|
||||
Connection connection = (Connection)_channel.getRequest().getAttribute(UPGRADE_CONNECTION_ATTRIBUTE);
|
||||
if (connection != null)
|
||||
{
|
||||
Throwable cancelled = getEndPoint().cancelFillInterest(_input::getError);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("cancelled {}", this, cancelled);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Upgrade from {} to {}", this, connection);
|
||||
_channel.getState().upgrade();
|
||||
|
@ -406,6 +404,11 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
}
|
||||
}
|
||||
|
||||
boolean complete = _input.consumeAll();
|
||||
Throwable cancelled = getEndPoint().cancelFillInterest(_input::getError);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("cancelled {}", this, cancelled);
|
||||
|
||||
// Finish consuming the request
|
||||
// If we are still expecting
|
||||
if (_channel.isExpecting100Continue())
|
||||
|
|
Loading…
Reference in New Issue