lnc-web icon indicating copy to clipboard operation
lnc-web copied to clipboard

Make connect timeout configurable (or something else)

Open huumn opened this issue 1 year ago • 1 comments

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.

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

huumn avatar Apr 27 '24 00:04 huumn

Yes I second this, would love to be able to configure the timeout to be a bit longer. It seems to be 50/50 chance of successful connection at times as it times out just before successfully connecting.

lnbc1QWFyb24 avatar Jun 15 '24 00:06 lnbc1QWFyb24