lightninglabs / lightninglabs/lnc-web
Make connect timeout configurable (or something else)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
The package currently waits a hardcoded second for the connection to succeed and when that times out it leaves the connection in an undetermined state. Increasing the timeout could give someone more certainty the connection actually failed.
This might be legacy code considering usage of `WithBlock` in `lightning-node-connect`'s `grpc.DialOptions` is listed as a [deprecated antipattern](https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md).
Anyway, it's hard to determine, as a consumer of `connect`, how to recover when the function reports a failure.
https://github.com/lightninglabs/lnc-web/blob/f65cf92b50b3d580072d76a40eff763a97d7a67b/lib/lnc.ts#L226-L250
Contributor guide
No contributing guide indexed for this repository
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 with lib/lnc.ts#L226-L250, then read the linked gRPC WithBlock anti-pattern guidance. Determine whether connect should expose a configurable timeout or use another recovery approach; done means connection failures have clear, deterministic recovery behavior for consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, typescript
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100