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

Increase connection timeout for imports #37

Merged
merged 1 commit into from Apr 16, 2017

Conversation

Projects
None yet
2 participants
@markus1189
Collaborator

markus1189 commented Apr 16, 2017

TL;DR

Set the response timeout from 1s to 30s, because 1s is much too optimistic.

Why

From time to time I have the problem luck of being with a rather modest internet connection (~376Kb/s) and I noticed that even running something simple like:

let not = https://ipfs.io/ipfs/QmcTbCdS21pCxXysTzEiucDuwwLWbLUWNSKwkJVfwpy2zK/Prelude/Bool/not
in  not True

via dhall fails with ConnectionTimeout. I saw that the connection response timeout is set to 1 second, which is much too short for a bad internet connection.

How

To address this, I raised the time limit from 1 second to 30 seconds, because that is also the time that is used in the default managerResponseTimeout (https://hackage.haskell.org/package/http-client-0.5.6.1/docs/src/Network-HTTP-Client-Types.html#ManagerSettings).

With that setting I can finally use dhall even when I don't have a fast internet connection available. :D

@Gabriel439

This comment has been minimized.

Show comment
Hide comment
@Gabriel439

Gabriel439 Apr 16, 2017

Collaborator

Yeah, great idea! Sorry about picking such a strict default initially

Collaborator

Gabriel439 commented Apr 16, 2017

Yeah, great idea! Sorry about picking such a strict default initially

@Gabriel439 Gabriel439 merged commit 649acf3 into dhall-lang:master Apr 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment