drogonframework / drogonframework/drogon

Ability to detect client disconnection

Open
#2,190 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Is your feature request related to a problem? Please describe.**
In our project we are trying to use Drogon for very long requests (up to 10 minutes long). While it is possible to detect client disconnection when using async streaming responses (by checking `stream->send()` return value), it is impossible to detect client disconnection early using standard response. It makes it impossible to stop long running workloads and free server resources upon client disconnection.

**Describe the solution you'd like**
It would be nice to be able to install client disconnection callback. We could use the callback to execute workload stopping mechanism on our end.

**Describe alternatives you've considered**
There is no alternative I know of.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.