/** * Sends a {@code RST_STREAM} frame even if we don't know about the stream. This error condition is most likely * triggered by the first frame of a stream being invalid. That is, there was an error reading the frame before * we could create a new stream. */ private ChannelFuture resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise) { ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise); if (future.isDone()) { closeConnectionOnError(ctx, future); } else { future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { closeConnectionOnError(ctx, future); } }); } return future; }
ChannelFuture future = frameWriter().writeGoAway(ctx, lastStreamId, errorCode, debugData, promise);
future = promise.setSuccess(); } else { future = frameWriter().writeRstStream(ctx, stream.id(), errorCode, promise);
/** * Sends a {@code RST_STREAM} frame even if we don't know about the stream. This error condition is most likely * triggered by the first frame of a stream being invalid. That is, there was an error reading the frame before * we could create a new stream. */ private ChannelFuture resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise) { ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise); if (future.isDone()) { closeConnectionOnError(ctx, future); } else { future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { closeConnectionOnError(ctx, future); } }); } return future; }
/** * Sends a {@code RST_STREAM} frame even if we don't know about the stream. This error condition is most likely * triggered by the first frame of a stream being invalid. That is, there was an error reading the frame before * we could create a new stream. */ private ChannelFuture resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise) { ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise); if (future.isDone()) { closeConnectionOnError(ctx, future); } else { future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { closeConnectionOnError(ctx, future); } }); } return future; }
ChannelFuture future = frameWriter().writeGoAway(ctx, lastStreamId, errorCode, debugData, promise);
ChannelFuture future = frameWriter().writeGoAway(ctx, lastStreamId, errorCode, debugData, promise);
future = promise.setSuccess(); } else { future = frameWriter().writeRstStream(ctx, stream.id(), errorCode, promise);
future = promise.setSuccess(); } else { future = frameWriter().writeRstStream(ctx, stream.id(), errorCode, promise);