484167 - GOAWAY frames aren't handling disconnects appropriately on Client.
Improved handling of the failure case.
This commit is contained in:
parent
c3889873f6
commit
77e0df1193
|
@ -168,7 +168,7 @@ public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements
|
|||
@Override
|
||||
public void onFailure(Session session, Throwable failure)
|
||||
{
|
||||
connection.abort(failure);
|
||||
connection.close(failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,15 +61,20 @@ public class HttpConnectionOverHTTP2 extends HttpConnection
|
|||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
close(new AsynchronousCloseException());
|
||||
}
|
||||
|
||||
protected void close(Throwable failure)
|
||||
{
|
||||
// First close then abort, to be sure that the connection cannot be reused
|
||||
// from an onFailure() handler or by blocking code waiting for completion.
|
||||
getHttpDestination().close(this);
|
||||
session.close(ErrorCode.NO_ERROR.code, null, Callback.NOOP);
|
||||
abort(new AsynchronousCloseException());
|
||||
abort(failure);
|
||||
}
|
||||
|
||||
protected void abort(Throwable failure)
|
||||
private void abort(Throwable failure)
|
||||
{
|
||||
for (HttpChannel channel : channels)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue