diff --git a/websocketpp/impl/endpoint_impl.hpp b/websocketpp/impl/endpoint_impl.hpp index 7f8b0b52b9..9b3c4a68c6 100644 --- a/websocketpp/impl/endpoint_impl.hpp +++ b/websocketpp/impl/endpoint_impl.hpp @@ -174,7 +174,7 @@ void endpoint::close(connection_hdl hdl, const close::status::value code, const std::string & reason) { lib::error_code ec; - send(hdl,code,reason,ec); + close(hdl,code,reason,ec); if (ec) { throw ec; } }