HTTP/2 SimpleChannelPromiseAggregator failure condition

Motivation:
If a SimpleChannelPromiseAggregator is failed before any new promises are generated, the failure is not propegated through to the aggregated promise.

Modifications:
- Failures should be allowed to occur even if no new promises have been generated

Result:
Failures are always allowed.
This commit is contained in:
Scott Mitchell 2015-08-21 11:22:34 -07:00
parent 1fefe9affb
commit ac9ae14bd9

View File

@ -261,7 +261,7 @@ public final class Http2CodecUtil {
*/ */
@Override @Override
public ChannelPromise setFailure(Throwable cause) { public ChannelPromise setFailure(Throwable cause) {
if (awaitingPromises()) { if (awaitingPromises() || expectedCount == 0) {
++failureCount; ++failureCount;
if (failureCount == 1) { if (failureCount == 1) {
promise.setFailure(cause); promise.setFailure(cause);