Skip to content

NSInputStream produced by Stream.toNSInputStream can cause the isolate to hang #2333

Open
@brianquinlan

Description

@brianquinlan

toNSInputStream explicitly uses ports between Dart and the Objective-C shim:

NSInputStream toNSInputStream() {

This can cause a hang if the user of the shim doesn't close it explicitly.

This is a problem for package:cupertino_http where the network loading framework will not call close if the HTTP request was aborted before open is called.

@liamappelbe I remember at some point callbacks changed their behavior in this regard. If I changed the implementation to use callbacks, would that fix the hang? I'm not sure how the current async callback implementation works.

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