diff --git a/libi2pd_client/AddressBook.cpp b/libi2pd_client/AddressBook.cpp index b71ee5eb..eee85967 100644 --- a/libi2pd_client/AddressBook.cpp +++ b/libi2pd_client/AddressBook.cpp @@ -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) { diff --git a/libi2pd_client/Torrents.cpp b/libi2pd_client/Torrents.cpp index 61219e45..a7e7aa5f 100644 --- a/libi2pd_client/Torrents.cpp +++ b/libi2pd_client/Torrents.cpp @@ -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)