diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index 6aede6e69c..3c72b504b0 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -397,7 +397,6 @@ public: } protected: connection_ptr create_connection(); - void remove_connection(connection_ptr con); alog_type m_alog; elog_type m_elog; @@ -418,9 +417,6 @@ private: rng_type m_rng; - // endpoint resources - std::set m_connections; - // static settings bool const m_is_server; diff --git a/websocketpp/impl/endpoint_impl.hpp b/websocketpp/impl/endpoint_impl.hpp index 2a7c82de5f..e30c0d9df4 100644 --- a/websocketpp/impl/endpoint_impl.hpp +++ b/websocketpp/impl/endpoint_impl.hpp @@ -50,9 +50,6 @@ endpoint::create_connection() { // Cast that weak pointer to void* and manage it using another shared_ptr // connection_hdl hdl(reinterpret_cast(new connection_weak_ptr(con))); - // con->set_handle(hdl); - - // con->set_handle(w); // Copy default handlers from the endpoint @@ -67,14 +64,6 @@ endpoint::create_connection() { con->set_validate_handler(m_validate_handler); con->set_message_handler(m_message_handler); - con->set_termination_handler( - lib::bind( - &type::remove_connection, - this, - lib::placeholders::_1 - ) - ); - lib::error_code ec; ec = transport_type::init(con); @@ -83,9 +72,6 @@ endpoint::create_connection() { return connection_ptr(); } - scoped_lock_type lock(m_mutex); - m_connections.insert(con); - return con; } @@ -216,20 +202,6 @@ void endpoint::pong(connection_hdl hdl, std::string const & if (ec) { throw ec; } } -template -void endpoint::remove_connection(connection_ptr con) { - std::stringstream s; - s << "remove_connection. New count: " << m_connections.size()-1; - m_alog.write(log::alevel::devel,s.str()); - - scoped_lock_type lock(m_mutex); - - // unregister the termination handler - con->set_termination_handler(termination_handler()); - - m_connections.erase(con); -} - } // namespace websocketpp #endif // WEBSOCKETPP_ENDPOINT_IMPL_HPP