Skip to content

Handling timeout #10

@winterland1989

Description

@winterland1989

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions