Skip to content

Dart CLI hangs due to unclosed HTTP client #403

Description

@matthew-carroll

I discovered experimentally that my GitHub instance was causing my CLI app to hang. All of my code would complete executing and then the terminal would hang for nearly 20 seconds for no apparent reason.

Eventually I tried passing my own Client into GitHub and then manually closing the Client after loading info from GitHub. This immediately fixed the hanging issue.

By default, the Client should be closed within GitHub. If desired, perhaps you could add an option to use a long-lived connection, but in the absence of passing additional configuration, the default behavior should be to close the connection after every call. Otherwise developers will end up very confused like I was.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions