close stream after HTTP response

This commit is contained in:
orignal committed 2026-08-04 09:35:51 -04:00
1 parent 57874dafb6
commit 6246c4f9d3
2 files changed
+2

No files matched your search

+1
View File
@@ -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)
{
+1
View File
@@ -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)