Skip to content

Commit 4336cfc

Browse files
authored
Merge pull request #1586 from WebPlatformForEmbedded/pgorszkowski/2.46/fix_suspending_closed_websocket_in_pagehide
[BFCache][WebSocket] don't dispatch error if websocket is closed in p…
2 parents dd19f4d + 1581aa5 commit 4336cfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/WebCore/Modules/websockets/WebSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ void WebSocket::contextDestroyed()
503503

504504
void WebSocket::suspend(ReasonForSuspension reason)
505505
{
506-
if (!m_channel)
506+
if (!m_channel || m_state == CLOSING || m_state == CLOSED)
507507
return;
508508

509509
if (reason == ReasonForSuspension::BackForwardCache) {

0 commit comments

Comments
 (0)