diff --git a/src/endpoint.hpp b/src/endpoint.hpp index 178d5f09b1..1b96eeb5df 100644 --- a/src/endpoint.hpp +++ b/src/endpoint.hpp @@ -211,7 +211,7 @@ public: // close can call terminate immediately which removes the connection // from m_connections, invalidating the iterator. while(!m_connections.empty()) { - (m_connections->begin())->close(code,reason); + (*m_connections.begin())->close(code,reason); } }