DefaultHttp2ConnectionEncoder async SETTINGS ACK SimpleChannelPromiseAggregator promise usage
Motivaiton: DefaultHttp2ConnectionEncoder uses SimpleChannelPromiseAggregator to combine two operations into a single future status. However it directly uses the SimpleChannelPromiseAggregator object instead of using the newPromise() method in one case. This may result in premature completion of the aggregated future. Modifications: - DefaultHttp2ConnectionEncoder to use SimpleChannelPromiseAggregator#newPromise() instead of directly using the SimpleChannelPromiseAggregator instance when writing the settings ACK frame Result: More correct status for the SETTING ACK frame writing when auto settings ACK is disabled.
This commit is contained in:
parent
29661fdc96
commit
306a855d93
@ -291,7 +291,7 @@ public class DefaultHttp2ConnectionEncoder implements Http2ConnectionEncoder, Ht
|
|||||||
// Acknowledge receipt of the settings. We should do this before we process the settings to ensure our
|
// Acknowledge receipt of the settings. We should do this before we process the settings to ensure our
|
||||||
// remote peer applies these settings before any subsequent frames that we may send which depend upon
|
// remote peer applies these settings before any subsequent frames that we may send which depend upon
|
||||||
// these new settings. See https://github.com/netty/netty/issues/6520.
|
// these new settings. See https://github.com/netty/netty/issues/6520.
|
||||||
frameWriter.writeSettingsAck(ctx, aggregator);
|
frameWriter.writeSettingsAck(ctx, aggregator.newPromise());
|
||||||
|
|
||||||
// We create a "new promise" to make sure that status from both the write and the application are taken into
|
// We create a "new promise" to make sure that status from both the write and the application are taken into
|
||||||
// account independently.
|
// account independently.
|
||||||
|
Loading…
Reference in New Issue
Block a user