Bug fix: main async request execution handlers to release teh associated response consumer upon exception
This commit is contained in:
parent
74ae768e0d
commit
39023dfed1
|
@ -100,6 +100,10 @@ public class Http2AsyncMainClientExec implements AsyncExecChainHandler {
|
|||
|
||||
@Override
|
||||
public void failed(final Exception cause) {
|
||||
final AsyncDataConsumer entityConsumer = entityConsumerRef.getAndSet(null);
|
||||
if (entityConsumer != null) {
|
||||
entityConsumer.releaseResources();
|
||||
}
|
||||
execRuntime.markConnectionNonReusable();
|
||||
asyncExecCallback.failed(cause);
|
||||
}
|
||||
|
|
|
@ -116,6 +116,10 @@ class HttpAsyncMainClientExec implements AsyncExecChainHandler {
|
|||
|
||||
@Override
|
||||
public void failed(final Exception cause) {
|
||||
final AsyncDataConsumer entityConsumer = entityConsumerRef.getAndSet(null);
|
||||
if (entityConsumer != null) {
|
||||
entityConsumer.releaseResources();
|
||||
}
|
||||
execRuntime.markConnectionNonReusable();
|
||||
asyncExecCallback.failed(cause);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue