mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 11:47:56 +08:00
Shutdown connection by server
This commit is contained in:
parent
d8bc8e27c9
commit
38a4175d8a
@ -163,10 +163,10 @@ void HttpServer::onRequest(const TcpConnectionPtr& conn, const HttpRequestPtr& r
|
|||||||
MsgBuffer buf;
|
MsgBuffer buf;
|
||||||
response.setCloseConnection(_close);
|
response.setCloseConnection(_close);
|
||||||
((HttpResponseImpl &)response).appendToBuffer(&buf);
|
((HttpResponseImpl &)response).appendToBuffer(&buf);
|
||||||
conn->send(buf.peek(),buf.readableBytes());
|
conn->send(std::move(buf));
|
||||||
// if (response.closeConnection()) {
|
if (_close) {
|
||||||
// conn->shutdown();
|
conn->shutdown();
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
2
trantor
2
trantor
@ -1 +1 @@
|
|||||||
Subproject commit 3d8b0e2ad08ece49c471d0944d339e6aa20f8328
|
Subproject commit 0d18d03f0679234bec08efaa0f3a45cf3fe65834
|
Loading…
Reference in New Issue
Block a user