Wire Grpc: There is no way to wait for a connection to be established before proceeding
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4.4k
- Forks
- 627
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 20
Description
Wire Grpc provides the execute(CoroutineScope) that internally launches a coroutine on IO to connect & read messages.
In our business logic we are also launching coroutines to read the incoming messages & send keep alive pings to our system, immediately after executing the call.
The problem is that there is no way currently to wait for the initial call to complete, ie some sort of callback that signifies a connection is properly established.
Ideally I'd run my pings after a successful connection but now I just run the pings unconditionally and handle if a pong doesnt get back within an arbitrary timeout.
Would be great if this could be supported so that instead I can just awaitConnected() or something.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Wire Grpc execute(CoroutineScope) entry point and trace how its connection coroutine reports progress. Define how a successful initial connection should be exposed for callers that start message readers and keep-alive pings, then verify the behavior around connection failure and the proposed awaitConnected() usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, kotlin
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100