ClientCall.isReady() is true after ClientCall.halfClose()
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.