LibWebSocket: Don't allow a connection to be discarded more than once

This commit is contained in:
Tim Ledbetter
2024-09-25 09:54:55 +01:00
committed by Andreas Kling
parent f1be662f68
commit 6095aa3cc5
Notes: github-actions[bot] 2024-09-29 09:47:46 +00:00
2 changed files with 6 additions and 0 deletions

View File

@@ -615,6 +615,10 @@ void WebSocket::fatal_error(WebSocket::Error error)
void WebSocket::discard_connection()
{
if (m_discard_connection_requested)
return;
m_discard_connection_requested = true;
deferred_invoke([this] {
VERIFY(m_impl);
m_impl->discard_connection();