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

Handling timeout #10

Open
winterland1989 opened this issue Dec 12, 2016 · 0 comments
Open

Handling timeout #10

winterland1989 opened this issue Dec 12, 2016 · 0 comments

Comments

@winterland1989
Copy link
Owner

winterland1989 commented Dec 12, 2016

I'd like to have a discussion on how to handle connection timeout scenarios, currently we do nothing about it, so user have to use timeout themselves. One may argue that it's the right thing to do in a library: to leave possible recovery strategies to user. But i'm not sure about this(actually i'm not sure on how to handle this in haskell code in general).

Anyway, here's what i proposed: Add timeout to ConnectInfo(default to 30s), and once timeout happend, we throw a NetworkException and close the connection instead of letting user decide what to do.

Is there any objection on this? Keep in mind that timeout on windows is broken so it may introduce more trouble than it seems.

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

No branches or pull requests

1 participant