mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWebSocket: Don't allow a connection to be discarded more than once
This commit is contained in:
committed by
Andreas Kling
parent
f1be662f68
commit
6095aa3cc5
Notes:
github-actions[bot]
2024-09-29 09:47:46 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6095aa3cc5a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1561
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user