+
Skip to content

Dart CLI hangs due to unclosed HTTP client #403

@matthew-carroll

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.

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载