Skip to content

Commit fca1d3c

Browse files
authored
servlet: set description for CANCELLED status (#11927)
1 parent 2f52a00 commit fca1d3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

servlet/src/main/java/io/grpc/servlet/ServletServerStream.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ public void cancel(Status status) {
297297
}
298298
transportState.runOnTransportThread(() -> transportState.transportReportStatus(status));
299299
// There is no way to RST_STREAM with CANCEL code, so write trailers instead
300-
close(Status.CANCELLED.withCause(status.asRuntimeException()), new Metadata());
300+
close(Status.CANCELLED.withDescription("Servlet stream cancelled")
301+
.withCause(status.asRuntimeException()),
302+
new Metadata());
301303
CountDownLatch countDownLatch = new CountDownLatch(1);
302304
transportState.runOnTransportThread(() -> {
303305
asyncCtx.complete();

0 commit comments

Comments
 (0)