We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5692563 commit 14b199cCopy full SHA for 14b199c
http/server/HttpHandler.cpp
@@ -23,7 +23,7 @@ int HttpHandler::invokeHttpHandler(const http_handler* handler) {
23
ctx->response = resp;
24
ctx->writer = writer;
25
status_code = handler->ctx_handler(ctx);
26
- if (writer->state != hv::HttpResponseWriter::SEND_BEGIN) {
+ if (writer && writer->state != hv::HttpResponseWriter::SEND_BEGIN) {
27
status_code = HTTP_STATUS_UNFINISHED;
28
}
29
http/server/HttpResponseWriter.h
@@ -159,7 +159,7 @@ class HttpResponseWriter : public SocketChannel {
159
160
state = SEND_END;
161
if (!response->IsKeepAlive()) {
162
- close();
+ close(true);
163
164
return ret;
165
0 commit comments