drogonframework / drogonframework/drogon
Ability to detect client disconnection
- 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
Assessment
This issue has not been assessed yet.