Open BhaagBoseDK opened 2 years ago
Another example
umbrel@umbrel:~/utils/mylndg/lndg $ time lncli connect 037c0bb263a4fe95f0ed598b50cf51e5732a6bc1c48d1c81c5e89f2442939dffdd@109.173.205.40:55596 --timout 30s
real 2m2.672s
user 0m2.016s
sys 0m0.318s
I think we may need more documentation about this.
The timeout does not applies to the request itself, when the client calls ConnectPeer
until it gets a response from the server, but to the dial connection establishment. If there is name resolution So everything else is not counted in that timeout: noise protocol, handshake, waiting for acquiring locks, etc..
I will check to ensure that timeouts apply when using tor dials.
In your second example I think you are using the default timeout (2 min) because of a bad param name --timout 30s
instead of --timeout 30
Background
refer #4123 and #4452 which seem to fix this issue. However, I noticed that the call does not respect the timeout and takes 3+ minutes.
Call
response = stub.ConnectPeer(request = ln.ConnectPeerRequest(addr=address, perm=False, timeout=5))
Result
Your environment
lnd
uname -a
on *Nix)Linux umbrel 5.10.17-v8+ #1421 SMP PREEMPT Thu May 27 14:01:37 BST 2021 aarch64 GNU/Linux
Steps to reproduce
This happens only at times. I could not find a specific pattern.
Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.
Expected behaviour
Time out should be respected.
Actual behaviour
At times time call gets stuck.