diff --git a/lib/src/HttpServer.cc b/lib/src/HttpServer.cc index 0248affd..00bd9df3 100755 --- a/lib/src/HttpServer.cc +++ b/lib/src/HttpServer.cc @@ -163,10 +163,10 @@ void HttpServer::onRequest(const TcpConnectionPtr& conn, const HttpRequestPtr& r MsgBuffer buf; response.setCloseConnection(_close); ((HttpResponseImpl &)response).appendToBuffer(&buf); - conn->send(buf.peek(),buf.readableBytes()); -// if (response.closeConnection()) { -// conn->shutdown(); -// } + conn->send(std::move(buf)); + if (_close) { + conn->shutdown(); + } }); diff --git a/trantor b/trantor index 3d8b0e2a..0d18d03f 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 3d8b0e2ad08ece49c471d0944d339e6aa20f8328 +Subproject commit 0d18d03f0679234bec08efaa0f3a45cf3fe65834