Skip to content

examples/image_list: missing await on HttpResponse.close() #184317

@randomizedcoder

Description

@randomizedcoder

In examples/image_list/lib/main.dart, the local HTTPS server's request handler calls request.response.close() without await (line 115). HttpResponse.close() returns a Future that completes when the response is fully sent. Without await, the handler may return before response bytes are flushed, potentially causing incomplete image responses under load.

Fix: Add await to request.response.close(). One-line change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: examplesSample code and demoshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions