mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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: 6fc19ec059
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
|
// -> Otherwise
|
||||||
// - Do nothing.
|
// - Do nothing.
|
||||||
// NOTE: All of these are handled by the WebSocket Protocol when calling close()
|
// 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);
|
m_websocket->close(1001);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue