grpc / grpc/grpc-rust

Server-streaming requests block until first message is received

Open
#2,302 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Bug Report

### Version

tonic v0.13.1
tonic-build v0.13.1

### Platform

`Linux arbiter 6.14.10-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 04 Jun 2025 18:52:21 +0000 x86_64 GNU/Linux`

### Description

Upon requesting a streaming response, the (let's call it) "initial" call blocks until the first message is received, rather than `.next()` doing the blocking.

My code goes something like this :
```rust
let mut response = client.streaming_request(request.clone()).await?.into_inner();
while let Some(obj) = response.next().await { ... }
```

I would expect `.next()` to do *all* the blocking here (bar establishing the connection), but the blockage is split across `.streaming_request()` *and* `.next()`, the former blocking until the first streamed response, and the latter handling all subsequent responses.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.