diff --git a/http/vibe/http/websockets.d b/http/vibe/http/websockets.d index bbe654a02a..6d85272090 100644 --- a/http/vibe/http/websockets.d +++ b/http/vibe/http/websockets.d @@ -801,7 +801,10 @@ final class WebSocket { private void startReader() { m_readMutex.performLocked!({}); //Wait until initialization - scope (exit) m_readCondition.notifyAll(); + scope (exit) { + m_conn.close(); + m_readCondition.notifyAll(); + } try { while (!m_conn.empty) { assert(!m_nextMessage);