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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions