-
Notifications
You must be signed in to change notification settings - Fork 30.5k
examples/image_list: missing await on HttpResponse.close() #184317
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: examplesSample code and demosSample code and demoshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listd: examplesSample code and demosSample code and demoshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Type
Fields
Give feedbackNo fields configured for issues without a type.
In
examples/image_list/lib/main.dart, the local HTTPS server's request handler callsrequest.response.close()withoutawait(line 115).HttpResponse.close()returns aFuturethat completes when the response is fully sent. Withoutawait, the handler may return before response bytes are flushed, potentially causing incomplete image responses under load.Fix: Add
awaittorequest.response.close(). One-line change.