Skip to content

Commit

Permalink
Revert "core: add description to Status.UNKNOWN in ServerImpl's #inte…
Browse files Browse the repository at this point in the history
…rnalClose (grpc#10643)"

This reverts commit 8b4b14a.
  • Loading branch information
YifeiZhuang committed Nov 22, 2023
1 parent 860b5cb commit 55dca05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions core/src/main/java/io/grpc/internal/ServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,7 @@ void setListener(ServerStreamListener listener) {
*/
private void internalClose(Throwable t) {
// TODO(ejona86): this is not thread-safe :)
String description = "Application error processing RPC";
stream.close(Status.UNKNOWN.withDescription(description).withCause(t), new Metadata());
stream.close(Status.UNKNOWN.withCause(t), new Metadata());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,7 @@ public void onCompleted() {
.onNext(StreamingInputCallRequest.getDefaultInstance());

assertTrue(finishLatch.await(900, TimeUnit.MILLISECONDS));
Status actualStatus = Status.fromThrowable(throwableRef.get());
Status expectedStatus = Status.UNKNOWN.withDescription("Application error processing RPC");
assertEquals(expectedStatus.getCode(), actualStatus.getCode());
assertEquals(expectedStatus.getDescription(), actualStatus.getDescription());
assertNull(actualStatus.getCause());
assertEquals(Status.UNKNOWN, Status.fromThrowable(throwableRef.get()));
assertNull(responseRef.get());
}
}

0 comments on commit 55dca05

Please sign in to comment.