mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-04-20 01:43:12 +02:00
Don't check for connection closed in send and send_file. Sometimes the connection closed callback gets called before send, but the connection still seems to be alive. Will work on it later.
This commit is contained in:
parent
b8624f190a
commit
c5ea34afdc
@ -54,7 +54,7 @@ void HTTPServer::closedCallbackDefault(const HttpSession::Ptr &session) {
|
||||
|
||||
if (r == nullptr) {
|
||||
lock.unlock();
|
||||
printf("Error HTTPServer::closedCallbackDefault: r == nullptr!\n");
|
||||
//printf("Error HTTPServer::closedCallbackDefault: r == nullptr!\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ void Request::next_stage() {
|
||||
}
|
||||
|
||||
void Request::send() {
|
||||
if (connection_closed) {
|
||||
RequestPool::return_request(this);
|
||||
return;
|
||||
}
|
||||
//if (connection_closed) {
|
||||
// RequestPool::return_request(this);
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (http_parser->isKeepAlive()) {
|
||||
response->addHeadValue("Connection", "Keep-Alive");
|
||||
@ -67,10 +67,10 @@ void Request::send() {
|
||||
}
|
||||
|
||||
void Request::send_file(const std::string &p_file_path) {
|
||||
if (connection_closed) {
|
||||
RequestPool::return_request(this);
|
||||
return;
|
||||
}
|
||||
//if (connection_closed) {
|
||||
// RequestPool::return_request(this);
|
||||
// return;
|
||||
//}
|
||||
|
||||
file_path = p_file_path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user