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;
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
2
trantor
2
trantor
@ -1 +1 @@
|
||||
Subproject commit 3d8b0e2ad08ece49c471d0944d339e6aa20f8328
|
||||
Subproject commit 0d18d03f0679234bec08efaa0f3a45cf3fe65834
|
Loading…
Reference in New Issue
Block a user