When a client actively closes a link, can I do some resource cleanup for a specific request?
pikalin1997 opened this issue · 1 comments
pikalin1997 commented
I am using cpphttplib to build a server. After receiving the request, the back end will load resources asynchronously for processing. However, if the client actively breaks the link, my server will not be aware of this matter, which will lead to the release of back-end resources after the completion of scheduling, resulting in data waste. Or can I just inherit httplib::Server to override the process_request implementation?
yhirose commented
@pikalin1997 thank you for your question. Since this uses a blocking I/O socket, it cannot work with such asynchronous activities. I think you have to find another HTTP server library which supports asynchronous request handlers. Sorry about that...