diff --git a/websocket/src/websocket.cpp b/websocket/src/websocket.cpp index 41e5cf4..7f988b2 100644 --- a/websocket/src/websocket.cpp +++ b/websocket/src/websocket.cpp @@ -509,6 +509,12 @@ static dmExtension::Result AppFinalize(dmExtension::AppParams* params) static dmExtension::Result Finalize(dmExtension::Params* params) { + while (!g_Websocket.m_Connections.Empty()) + { + WebsocketConnection* conn = g_Websocket.m_Connections.Back(); + g_Websocket.m_Connections.Pop(); + DestroyConnection(conn); + } return dmExtension::RESULT_OK; }