diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index 5a7d661fa2..2c59a3f614 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -305,7 +305,7 @@ public: */ connection_ptr get_con_from_hdl(connection_hdl hdl, lib::error_code & ec) { scoped_lock_type lock(m_mutex); - connection_ptr con = lib::static_pointer_cast( + connection_ptr con = lib::static_pointer_cast( hdl.lock()); if (!con) { ec = error::make_error_code(error::bad_connection);