-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
Time restrict network operations #3157
Conversation
src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java
Outdated
Show resolved
Hide resolved
src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java
Outdated
Show resolved
Hide resolved
src/main/java/org/cryptomator/ui/keyloading/hub/AuthFlowTask.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend increasing the timeout to at least 10 seconds. If we think of a bad hotel or "Deutsche Bahn" WiFi, the user is connected to the corporate VPN and then wants to perform an unlock on a stressed hub server, giving up after 3 seconds is way too early in my opinion.
The default of OkHTTP is 5s for connect, read, write and 10s for the hole call (including DNS etc):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM but because of
This does not add a timeout to the timespan between start of the Auth Flow and its fulfillment (i.e. redirecting back to the app).
this does not fully solve the motivation of #3113
This can confuse users due to missing feedback/endless response waiting, especially, if different applications with explicit proxy settings have internet access.
because it is still true that if the server takes infinitely long to respond (e.g. no internet connection) Cryptomator waits forever for the response while trying to unlock a Hub vault.
So I think we should add a timeout waiting for the redirect as well, but if you prefer we can do that in another PR later.
Closes #3113
This PR adds to all network requests the timeout parameter, in order to detect and handle "no connection possible" events. It adds the time out to the request itself. For the authentication, this is not possible over the API, hence, only a connect timeout is set.
The timeout varies between 3 and 5 seconds.