aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_connection.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-08-11 06:25:32 +0900
committeripknHama <ipknhama@gmail.com>2014-08-11 06:27:21 +0900
commit9ca93dc799257bf52331bf83493e49aabc176d29 (patch)
tree144e488bae6ab9ff95f4d0dafc38982388515bb8 /include/http_connection.h
parent69c189b41a8d9edf0c614fef54c4a8fbb051db4a (diff)
downloadcrow-9ca93dc799257bf52331bf83493e49aabc176d29.tar.gz
crow-9ca93dc799257bf52331bf83493e49aabc176d29.zip
Fixes #14, long polling leak removed.
Diffstat (limited to 'include/http_connection.h')
-rw-r--r--include/http_connection.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/http_connection.h b/include/http_connection.h
index a030d73..04ffa3f 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -113,11 +113,11 @@ namespace crow
{
CROW_LOG_INFO << "Response: " << this << ' ' << res.code << ' ' << close_connection_;
- if (!socket_.is_open())
- return;
-
auto self = this->shared_from_this();
res.complete_request_handler_ = nullptr;
+
+ if (!socket_.is_open())
+ return;
static std::unordered_map<int, std::string> statusCodes = {
{200, "HTTP/1.1 200 OK\r\n"},