File tree Expand file tree Collapse file tree
lib/websocketpp/transport/asio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ class connection : public config::socket_type::socket_con_type {
312312 */
313313 timer_ptr set_timer (long duration, timer_handler callback) {
314314 timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>(
315- lib::ref ( *m_io_service) ,
315+ *m_io_service,
316316 lib::asio::milliseconds (duration)
317317 );
318318
@@ -461,8 +461,7 @@ class connection : public config::socket_type::socket_con_type {
461461 m_io_service = io_service;
462462
463463 if (config::enable_multithreading) {
464- m_strand = lib::make_shared<lib::asio::io_service::strand>(
465- lib::ref (*io_service));
464+ m_strand = lib::make_shared<lib::asio::io_service::strand>(*io_service);
466465 }
467466
468467 lib::error_code ec = socket_con_type::init_asio (io_service, m_strand,
Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ class endpoint : public config::socket_type {
191191
192192 m_io_service = ptr;
193193 m_external_io_service = true ;
194- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(
195- lib::ref (*m_io_service));
194+ m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(*m_io_service);
196195
197196 m_state = READY;
198197 ec = lib::error_code ();
@@ -660,9 +659,7 @@ class endpoint : public config::socket_type {
660659 * @since 0.3.0
661660 */
662661 void start_perpetual () {
663- m_work = lib::make_shared<lib::asio::io_service::work>(
664- lib::ref (*m_io_service)
665- );
662+ m_work = lib::make_shared<lib::asio::io_service::work>(*m_io_service);
666663 }
667664
668665 // / Clears the endpoint's perpetual flag, allowing it to exit when empty
@@ -826,8 +823,7 @@ class endpoint : public config::socket_type {
826823
827824 // Create a resolver
828825 if (!m_resolver) {
829- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
830- lib::ref (*m_io_service));
826+ m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(*m_io_service);
831827 }
832828
833829 tcon->set_uri (u);
Original file line number Diff line number Diff line change @@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> {
168168 return socket::make_error_code (socket::error::invalid_state);
169169 }
170170
171- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
172- lib::ref (*service));
171+ m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(*service);
173172
174173 m_state = READY;
175174
Original file line number Diff line number Diff line change @@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> {
193193 if (!m_context) {
194194 return socket::make_error_code (socket::error::invalid_tls_context);
195195 }
196- m_socket = lib::make_shared<socket_type>(
197- _WEBSOCKETPP_REF (*service),lib::ref (*m_context));
196+ m_socket = lib::make_shared<socket_type>(_WEBSOCKETPP_REF (*service),*m_context);
198197
199198 m_io_service = service;
200199 m_strand = strand;
You can’t perform that action at this time.
0 commit comments