@mega-yfue/eufy-sdk / CONNECT_TIMEOUT_MS
Variable: CONNECT_TIMEOUT_MS
const CONNECT_TIMEOUT_MS: 45000 = 45_000;How long a station is given to answer a lookup before the connection gives up on it and closes.
The whole deadline for reaching a station: the lookups are re-sent every second until one is answered, and a connection that reaches this closes itself, so nothing addressed to that station can succeed afterwards. Published because it bounds every wait on a session connecting — a second number for the same deadline elsewhere would outlive the connection it waits on and charge the difference to every failure.
The relay handshake starts once the lookup server has acknowledged the P2P request for 24 lookup rounds, so about 25 s in. The vendor app's own remote connect has a 30 s budget, which leaves the handshake 3–6 s. Forty-five seconds keeps the vendor's threshold and gives the handshake about 20 s to complete. A station that never acknowledges the request, as an offline one does, takes this long to fail.