servlet: set description for CANCELLED status (#11927)

This commit is contained in:
Alex Panchenko 2025-03-12 10:39:49 +02:00 committed by GitHub
parent 2f52a00364
commit fca1d3cf43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -297,7 +297,9 @@ final class ServletServerStream extends AbstractServerStream {
} }
transportState.runOnTransportThread(() -> transportState.transportReportStatus(status)); transportState.runOnTransportThread(() -> transportState.transportReportStatus(status));
// There is no way to RST_STREAM with CANCEL code, so write trailers instead // There is no way to RST_STREAM with CANCEL code, so write trailers instead
close(Status.CANCELLED.withCause(status.asRuntimeException()), new Metadata()); close(Status.CANCELLED.withDescription("Servlet stream cancelled")
.withCause(status.asRuntimeException()),
new Metadata());
CountDownLatch countDownLatch = new CountDownLatch(1); CountDownLatch countDownLatch = new CountDownLatch(1);
transportState.runOnTransportThread(() -> { transportState.runOnTransportThread(() -> {
asyncCtx.complete(); asyncCtx.complete();