mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 13:05:12 +00:00
LibWeb: Don't close websocket if already closed in make_disappear()
AO
This commit is contained in:
parent
d8bf8a3bb9
commit
6fc19ec059
Notes:
github-actions[bot]
2025-02-26 19:21:16 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6fc19ec0596 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3707
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue