diff --git a/lib/websocketpp/transport/asio/connection.hpp b/lib/websocketpp/transport/asio/connection.hpp index 8eb8c7599..d947a6169 100644 --- a/lib/websocketpp/transport/asio/connection.hpp +++ b/lib/websocketpp/transport/asio/connection.hpp @@ -312,7 +312,7 @@ class connection : public config::socket_type::socket_con_type { */ timer_ptr set_timer(long duration, timer_handler callback) { timer_ptr new_timer = lib::make_shared( - lib::ref(*m_io_service), + *m_io_service, lib::asio::milliseconds(duration) ); @@ -461,8 +461,7 @@ class connection : public config::socket_type::socket_con_type { m_io_service = io_service; if (config::enable_multithreading) { - m_strand = lib::make_shared( - lib::ref(*io_service)); + m_strand = lib::make_shared(*io_service); } lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, diff --git a/lib/websocketpp/transport/asio/endpoint.hpp b/lib/websocketpp/transport/asio/endpoint.hpp index 46ff24c06..bbf7ef06b 100644 --- a/lib/websocketpp/transport/asio/endpoint.hpp +++ b/lib/websocketpp/transport/asio/endpoint.hpp @@ -191,8 +191,7 @@ class endpoint : public config::socket_type { m_io_service = ptr; m_external_io_service = true; - m_acceptor = lib::make_shared( - lib::ref(*m_io_service)); + m_acceptor = lib::make_shared(*m_io_service); m_state = READY; ec = lib::error_code(); @@ -660,9 +659,7 @@ class endpoint : public config::socket_type { * @since 0.3.0 */ void start_perpetual() { - m_work = lib::make_shared( - lib::ref(*m_io_service) - ); + m_work = lib::make_shared(*m_io_service); } /// Clears the endpoint's perpetual flag, allowing it to exit when empty @@ -826,8 +823,7 @@ class endpoint : public config::socket_type { // Create a resolver if (!m_resolver) { - m_resolver = lib::make_shared( - lib::ref(*m_io_service)); + m_resolver = lib::make_shared(*m_io_service); } tcon->set_uri(u); diff --git a/lib/websocketpp/transport/asio/security/none.hpp b/lib/websocketpp/transport/asio/security/none.hpp index 0e68a65c8..f6c39507b 100644 --- a/lib/websocketpp/transport/asio/security/none.hpp +++ b/lib/websocketpp/transport/asio/security/none.hpp @@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this { return socket::make_error_code(socket::error::invalid_state); } - m_socket = lib::make_shared( - lib::ref(*service)); + m_socket = lib::make_shared(*service); m_state = READY; diff --git a/lib/websocketpp/transport/asio/security/tls.hpp b/lib/websocketpp/transport/asio/security/tls.hpp index a8aafec5d..eda096127 100644 --- a/lib/websocketpp/transport/asio/security/tls.hpp +++ b/lib/websocketpp/transport/asio/security/tls.hpp @@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this { if (!m_context) { return socket::make_error_code(socket::error::invalid_tls_context); } - m_socket = lib::make_shared( - _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); + m_socket = lib::make_shared(_WEBSOCKETPP_REF(*service),*m_context); m_io_service = service; m_strand = strand;