mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Don't close websocket if already closed in make_disappear() AO
This commit is contained in:
committed by
Andreas Kling
parent
d8bf8a3bb9
commit
6fc19ec059
@@ -411,6 +411,10 @@ void WebSocket::make_disappear()
|
||||
// -> Otherwise
|
||||
// - Do nothing.
|
||||
// NOTE: All of these are handled by the WebSocket Protocol when calling close()
|
||||
auto ready_state = this->ready_state();
|
||||
if (ready_state == Requests::WebSocket::ReadyState::Closing || ready_state == Requests::WebSocket::ReadyState::Closed)
|
||||
return;
|
||||
|
||||
m_websocket->close(1001);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user