vcpkg/ports/cpp-netlib/stream-handler-executor.patch
ras0219 d0511fbd55
[cpp-netlib] Fix usage with boost 1.73 (#13671)
* [cpp-netlib] Fix usage with boost 1.72

* Add dependency port  boost-logic, boost-scope-exit

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
2020-09-27 17:37:11 -07:00

28 lines
1.1 KiB
Diff

diff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp
index ffb09b8..f3b3e99 100644
--- a/boost/network/protocol/stream_handler.hpp
+++ b/boost/network/protocol/stream_handler.hpp
@@ -41,6 +40,7 @@ typedef boost::asio::ssl::context ssl_context;
struct stream_handler {
public:
+ typedef tcp_socket::executor_type executor_type;
stream_handler(std::shared_ptr<tcp_socket> socket)
: tcp_sock_(std::move(socket)), ssl_enabled(false) {}
@@ -52,12 +52,12 @@ struct stream_handler {
stream_handler(boost::asio::io_service& io,
std::shared_ptr<ssl_context> ctx =
std::shared_ptr<ssl_context>()) {
- tcp_sock_ = std::make_shared<tcp_socket>(boost::ref(io));
+ tcp_sock_ = std::make_shared<tcp_socket>(io.get_executor());
ssl_enabled = false;
if (ctx) {
/// SSL is enabled
ssl_sock_ =
- std::make_shared<ssl_socket>(boost::ref(io), boost::ref(*ctx));
+ std::make_shared<ssl_socket>(io.get_executor(), boost::ref(*ctx));
ssl_enabled = true;
}
}