LibIPC: Don't verify that socket is closed when getting EPIPE on send

We can get an EPIPE when the other end of the connection closes, such
as when switching to a new WebContent process due to site isolation.
This commit is contained in:
Andrew Kaster 2025-04-29 20:20:40 -06:00 committed by Tim Flynn
commit 16f72ca36c
Notes: github-actions[bot] 2025-04-30 15:13:34 +00:00

View file

@ -73,8 +73,7 @@ TransportSocket::TransportSocket(NonnullOwnPtr<Core::LocalSocket> socket)
auto result = send_message(*m_socket, remaining_to_send_bytes, fds);
if (result.is_error()) {
if (result.error().is_errno() && result.error().code() == EPIPE) {
// The socket is closed, we can stop sending.
VERIFY(!m_socket->is_open());
// The socket is closed from the other end, we can stop sending.
break;
}
dbgln("TransportSocket::send_thread: {}", result.error());