412318 HttpChannel fix multiple calls to _transport.completed() if handle() is called multiple times while the channel is COMPLETED
This commit is contained in:
parent
5d1225b60e
commit
2d911612a0
|
@ -235,8 +235,6 @@ public class HttpChannel<T> implements HttpParser.RequestHandler<T>, Runnable
|
|||
public boolean handle()
|
||||
{
|
||||
LOG.debug("{} handle enter", this);
|
||||
if(_state.isCompleted())
|
||||
return false;
|
||||
|
||||
setCurrentHttpChannel(this);
|
||||
|
||||
|
@ -332,16 +330,11 @@ public class HttpChannel<T> implements HttpParser.RequestHandler<T>, Runnable
|
|||
}
|
||||
finally
|
||||
{
|
||||
next=Next.RECYCLE;
|
||||
_request.setHandled(true);
|
||||
_transport.completed();
|
||||
}
|
||||
}
|
||||
|
||||
if (next==Next.RECYCLE)
|
||||
{
|
||||
_request.setHandled(true);
|
||||
_transport.completed();
|
||||
}
|
||||
|
||||
LOG.debug("{} handle exit, result {}", this, next);
|
||||
|
||||
return next!=Next.WAIT;
|
||||
|
|
|
@ -76,8 +76,7 @@ public class HttpChannelState
|
|||
{
|
||||
CONTINUE, // Continue handling the channel
|
||||
WAIT, // Wait for further events
|
||||
COMPLETE, // Complete the channel
|
||||
RECYCLE, // Channel is completed
|
||||
COMPLETE // Complete the channel
|
||||
}
|
||||
|
||||
private final HttpChannel<?> _channel;
|
||||
|
@ -195,7 +194,7 @@ public class HttpChannelState
|
|||
return Next.WAIT;
|
||||
|
||||
case COMPLETED:
|
||||
return Next.RECYCLE;
|
||||
return Next.WAIT;
|
||||
|
||||
case REDISPATCH:
|
||||
_state=State.REDISPATCHED;
|
||||
|
|
Loading…
Reference in New Issue