ClientCall.isReady() is true after ClientCall.halfClose()
- Lenguaje dominante
- Java
- Estrellas
- 12.1k
- Forks
- 4k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 37
Descripción
I have code like this for a client streaming call:
```java
ClientCall call = ...;
ClientCall.Listener listener = new ClientCall.Listener() {
@Override
public void onReady() {
while(call.isReady()) {
if (allDataSent()) {
call.halfClose();
return;
}
sendMessage();
}
}
}
call.start(listener, metadata);
call.request(1);
```
I found `call.halfClose()` to be called more than once (and thus crash). I would have expected `call.isReady()` to be `false` after `call.halfClose()` was called since after half-closing, we certainly can't send any new messages.
Thoughts?
P.S: I am using this API, cause I need flow control and the `CallStreamObserver` is marked experimental.
Guía de contribución
Línea de trabajo
Start with the ClientCall.isReady() and halfClose() entry points and trace the client-streaming callback sequence shown in the report. Reproduce the repeated halfClose() case, then inspect existing tests or add a regression test that records the post-halfClose readiness behavior and verifies the settled contract.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- grpc, java
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100