mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 19:41:41 +00:00
close stream after HTTP response
This commit is contained in:
1 parent
57874dafb6
commit
6246c4f9d3
2 files changed
+2
No files matched your search
@@ -1035,6 +1035,7 @@ namespace client
|
||||
LogPrint(eLogError, "Addressbook: Receive HTTP response exception: ", ex.what ());
|
||||
return false;
|
||||
}
|
||||
stream->AsyncClose ();
|
||||
// check result
|
||||
if (res.result () != boost::beast::http::status::ok)
|
||||
{
|
||||
|
||||
@@ -1043,6 +1043,7 @@ namespace torrents
|
||||
boost::beast::http::async_read (*httpStream, *buf, *res,
|
||||
[this, httpStream, torrent, buf, res](const boost::beast::error_code& ecode, size_t bytes_transferred)
|
||||
{
|
||||
httpStream->GetStream ()->AsyncClose ();
|
||||
if (!ecode)
|
||||
{
|
||||
if (res->result () == boost::beast::http::status::ok)
|
||||
|
||||
Reference in new issue
Block a user