ClientCall.isReady() is true after ClientCall.halfClose()
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 37
Beschreibung
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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.