Repository navigation
phone-ssh: allow slower USB handshakes - #504
Conversation
Use a 20-second connect timeout so every device gets enough time during USB link setup and optional NFS-root startup. A dead connection can now take up to 14 seconds longer to report failure.
16ee0b3 to
b6d0366
Compare
|
Thanks. A slow first handshake is worth handling, and I appreciate that you I'd rather not move the default for every phone, though. When a phone is Could you make it an option instead?
The Mi 8's notes can then set it, and the other phones keep what they have. If |
|
Thank you, this is exactly what I asked for. The default stays at 6 seconds. One wording nit, and I can fix it when I merge: the new comment above CI was cancelled on the runner's side, not because of anything in the branch. I'll re-run it and merge once it's green, as |
… handshake (derekross#504) Some phones take longer than ssh's default to finish the first SSH handshake while their USB link is still coming up. tools/phone-ssh and tools/phone-ssh-proxy now take the connect timeout from OMAMOBILE_SSH_CONNECT_TIMEOUT, defaulting to 6 s as before, so a slow phone can ask for more without making a dead connection slower to report everywhere else. tests/phone-ssh covers the default and the override, and that the proxy receives it.
Summary
Keep the default
phone-sshconnection timeout at 6 seconds, configurable throughOMAMOBILE_SSH_CONNECT_TIMEOUTas a positive integer number of seconds. The same value is passed to the USB-bound proxy socket. Invalid values are rejected before SSH starts.This keeps ordinary connection failures quick while allowing a slower USB handshake to opt in to a longer timeout.
Checks
tests/phone-sshpassed, covering default, override, invalid values and proxy propagation.git diff --checkpassed.