Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustable kexTimeout #546

Open
Yonle opened this issue Aug 4, 2022 · 1 comment
Open

Adjustable kexTimeout #546

Yonle opened this issue Aug 4, 2022 · 1 comment

Comments

@Yonle
Copy link

Yonle commented Aug 4, 2022

The default kexTimeout (5000ms) is too quick for me. It would be good to have a way to adjust it.

@oakkitten
Copy link
Collaborator

oakkitten commented Aug 8, 2022

I believe kexTimeout is one of the arguments here

ConnectionInfo connectionInfo = connection.connect(serverKeyVerifier,
CONNECTION_TIMEOUT, CONNECTION_TIMEOUT);

I wonder if simply setting a higher value here would work without issues. If not, we could perhaps allow a connection attempt to linger until the next attempt. These come at increasingly longer intervals

private static final long[] DELAYS = new long[] {5, 15, 30, 60, 120, 300, 600, 900};

In either case, the next attempt cancels the previous, so if we were to make the first attempt to succeed, we'd have to increase the first number above.

ETA: If and when someone decides to tackle this, note that we have a little bit of UI showing the progress. Currently it tries to connect for 5 seconds, i.e. briefly, and then the notification will read something along “will try to connect in 30 seconds”. While this is far from ideal, we should think about how the notification should behave if we allow the connection attempt to be long. Things normally don't sit at “connecting...” for very long times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants