diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index 139a93179a..df58332576 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -297,6 +297,7 @@ public: * @param dur The length of the open handshake timeout in ms */ void set_open_handshake_timeout(long dur) { + scoped_lock_type guard(m_mutex); m_open_handshake_timeout_dur = dur; } @@ -321,6 +322,7 @@ public: * @param dur The length of the close handshake timeout in ms */ void set_close_handshake_timeout(long dur) { + scoped_lock_type guard(m_mutex); m_close_handshake_timeout_dur = dur; } @@ -342,6 +344,7 @@ public: * @param dur The length of the pong timeout in ms */ void set_pong_timeout(long dur) { + scoped_lock_type guard(m_mutex); m_pong_timeout_dur = dur; } diff --git a/websocketpp/impl/endpoint_impl.hpp b/websocketpp/impl/endpoint_impl.hpp index 1a150b6bf0..0dd14c5d13 100644 --- a/websocketpp/impl/endpoint_impl.hpp +++ b/websocketpp/impl/endpoint_impl.hpp @@ -40,6 +40,7 @@ endpoint::create_connection() { return connection_ptr(); }*/ + //scoped_lock_type guard(m_mutex); // Create a connection on the heap and manage it using a shared pointer connection_ptr con(new connection_type(m_is_server,m_user_agent,m_alog, m_elog, m_rng)); @@ -73,7 +74,7 @@ endpoint::create_connection() { if (m_pong_timeout_dur == config::timeout_pong) { con->set_pong_timeout(m_pong_timeout_dur); } - + lib::error_code ec; ec = transport_type::init(con); diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp index bbb4168d43..6b68982318 100644 --- a/websocketpp/transport/asio/connection.hpp +++ b/websocketpp/transport/asio/connection.hpp @@ -123,7 +123,7 @@ public: m_tcp_pre_init_handler = h; } - /// Sets the tcp pre init handler (deprecated) + /// Sets the tcp pre init handler (deprecated) /** * The tcp pre init handler is called after the raw tcp connection has been * established but before any additional wrappers (proxy connects, TLS