diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp index 0ac0a83800..2c9f5c97da 100644 --- a/websocketpp/transport/asio/security/none.hpp +++ b/websocketpp/transport/asio/security/none.hpp @@ -216,7 +216,7 @@ protected: h(ec); } - const lib::error_code &get_ec() const { + lib::error_code get_ec() const { return lib::error_code(); } private: @@ -228,7 +228,7 @@ private: socket_ptr m_socket; state m_state; - + connection_hdl m_hdl; socket_init_handler m_socket_init_handler; }; diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp index d4866dabf5..a56aa56eaa 100644 --- a/websocketpp/transport/asio/security/tls.hpp +++ b/websocketpp/transport/asio/security/tls.hpp @@ -251,7 +251,7 @@ protected: callback(m_ec); } - const lib::error_code &get_ec() const { + lib::error_code get_ec() const { return m_ec; }