27 lines
1.1 KiB
Diff
Executable file
27 lines
1.1 KiB
Diff
Executable file
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;
|
|
}
|
|
}
|