Yes, it is grpc-java.
How I detected this was that google-cloud-pubsub is one of our dependencies and I noticed that 1.114.6 works but not 1.114.7. After digging into it deeper, I found the grpc version was upgrade from 1.40.x to 1.41.x.
The server is written in Java and the client is written in Python. The server version is currently at 1.42.2. I am not sure what the client grpc version is. I am using Python 3.8 and protoc version is 3.6.1.
The disconnection happens in the middle of a streaming RPC and the cancellation is detected inside a while loop. Here is a sample code snippet:
Greeting greeting = request.getGreeting();
String firstName = greeting.getFirstName();
String lastName = greeting.getLastName();
int i = 0;
ServerCallStreamObserver<GreetResponse> serverCallStreamObserver =
(ServerCallStreamObserver<GreetResponse>)responseObserver;
try {
while (true) {
if (serverCallStreamObserver.isCancelled()) {
System.out.println("cancelled");
serverCallStreamObserver.onCompleted();
break;
}
String result = "Hello " + firstName + " " + lastName + ", response number: " + i;
GreetResponse response = GreetResponse.newBuilder()
.setResult(result)
.build();
responseObserver.onNext(response);
Thread.sleep(1000L);
i++;
}
} catch (InterruptedException e) {
e.printStackTrace();
}