Skip to content

Streaming a response keeps not needed memory for longer than necessary #291

@The-EDev

Description

@The-EDev

With the way responses are streamed (do_write_static() and do_write_general() when the body is larger than res_stream_threshold_), when a streaming pathway is taken, the method check_destroy() (which is responsible for freeing the memory occupied by the connection) is never called.

Furthermore, since the streaming logic itself is in the response class rather than connection class, any errors (ASIO exceptions) during the streaming process are very difficult to report to the connection let alone delete the connection based on the error.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions