This can reproduced with https://certification.bbctvapps.co.uk/act/test/networking/v1.3.1/websocket-client-initiated-closure/ When the WebSocket connection is closed, we return the close code provided by soup_websocket_connection_get_close_code(). But this value can be 0, which is an invalid return code, if the client abruptly closes the connection. We should return SOUP_WEBSOCKET_CLOSE_ABNORMAL in this case.
Pull request: https://github.com/WebKit/WebKit/pull/4787
Committed 254988@main (977e507ed577): <https://commits.webkit.org/254988@main> Reviewed commits have been landed. Closing PR #4787 and removing active labels.