Skip to content

Commit

Permalink
Fix missed entries; fix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-floeren committed Apr 17, 2019
1 parent 2c57b6f commit 1c699ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
endif ()

if (NOT Boost_USE_STATIC_LIBS)
add_definitions (/DBOOST_TEST_DYN_LINK)
add_definitions (-DBOOST_TEST_DYN_LINK)
endif ()

set (Boost_FIND_REQUIRED TRUE)
Expand Down
3 changes: 1 addition & 2 deletions websocketpp/transport/asio/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,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::asio::io_service::strand>(
lib::ref(*io_service));
m_strand.reset(new lib::asio::io_service::strand(*io_service));
}

lib::error_code ec = socket_con_type::init_asio(io_service, m_strand,
Expand Down
7 changes: 2 additions & 5 deletions websocketpp/transport/asio/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,7 @@ class endpoint : public config::socket_type {
* @since 0.3.0
*/
void start_perpetual() {
m_work = lib::make_shared<lib::asio::io_service::work>(
lib::ref(*m_io_service)
);
m_work.reset(new lib::asio::io_service::work(*m_io_service));
}

/// Clears the endpoint's perpetual flag, allowing it to exit when empty
Expand Down Expand Up @@ -853,8 +851,7 @@ class endpoint : public config::socket_type {

// Create a resolver
if (!m_resolver) {
m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
lib::ref(*m_io_service));
m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service));
}

tcon->set_uri(u);
Expand Down

1 comment on commit 1c699ce

@Calthron
Copy link

@Calthron Calthron commented on 1c699ce Apr 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you prefer using .reset (new ...) versus just removing lib::ref which is no longer needed?

Please sign in to comment.