@@ -221,7 +221,11 @@ private void handleFrame(ByteBuf frame) {
221
221
break ;
222
222
case REQUEST_CHANNEL :
223
223
long channelInitialRequestN = RequestChannelFrameCodec .initialRequestN (frame );
224
- handleChannel (streamId , frame , channelInitialRequestN );
224
+ handleChannel (streamId , frame , channelInitialRequestN , false );
225
+ break ;
226
+ case REQUEST_CHANNEL_COMPLETE :
227
+ long completeChannelInitialRequestN = RequestChannelFrameCodec .initialRequestN (frame );
228
+ handleChannel (streamId , frame , completeChannelInitialRequestN , true );
225
229
break ;
226
230
case METADATA_PUSH :
227
231
handleMetadataPush (metadataPush (super .getPayloadDecoder ().apply (frame )));
@@ -345,7 +349,7 @@ private void handleStream(int streamId, ByteBuf frame, long initialRequestN) {
345
349
}
346
350
}
347
351
348
- private void handleChannel (int streamId , ByteBuf frame , long initialRequestN ) {
352
+ private void handleChannel (int streamId , ByteBuf frame , long initialRequestN , boolean complete ) {
349
353
if (FrameHeaderCodec .hasFollows (frame )) {
350
354
RequestChannelResponderSubscriber subscriber =
351
355
new RequestChannelResponderSubscriber (streamId , initialRequestN , frame , this , this );
@@ -358,6 +362,9 @@ private void handleChannel(int streamId, ByteBuf frame, long initialRequestN) {
358
362
359
363
if (this .add (streamId , subscriber )) {
360
364
this .requestChannel (firstPayload , subscriber ).subscribe (subscriber );
365
+ if (complete ) {
366
+ subscriber .handleComplete ();
367
+ }
361
368
}
362
369
}
363
370
}
0 commit comments