Issue #1918 - Scalable scheduler implementation.
Fixed destroy of HttpChannel for HTTP/1.1: not at release() because the connection and therefore the channel will be reused, but at close(), when we're sure the connection will not be reused. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
db3891f3d2
commit
6cefd1c7dd
|
@ -88,7 +88,7 @@ public class HttpChannelOverHTTP extends HttpChannel
|
|||
@Override
|
||||
public void release()
|
||||
{
|
||||
connection.release(this);
|
||||
connection.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -169,11 +169,10 @@ public class HttpConnectionOverHTTP extends AbstractConnection implements Connec
|
|||
return receiver.onUpgradeFrom();
|
||||
}
|
||||
|
||||
public void release(HttpChannelOverHTTP channel)
|
||||
public void release()
|
||||
{
|
||||
// Restore idle timeout
|
||||
getEndPoint().setIdleTimeout(idleTimeout);
|
||||
channel.destroy();
|
||||
getHttpDestination().release(this);
|
||||
}
|
||||
|
||||
|
@ -188,9 +187,8 @@ public class HttpConnectionOverHTTP extends AbstractConnection implements Connec
|
|||
if (closed.compareAndSet(false, true))
|
||||
{
|
||||
getHttpDestination().close(this);
|
||||
|
||||
abort(failure);
|
||||
|
||||
channel.destroy();
|
||||
getEndPoint().shutdownOutput();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Shutdown {}", this);
|
||||
|
|
Loading…
Reference in New Issue