kernel: Handle aborted connections instead of crashing
This commit is contained in:
parent
75d0d12b71
commit
6bdf3169d2
@ -159,6 +159,9 @@ Result<void> UnixSocket::connect(Registers* regs, int flags, struct sockaddr* ad
|
||||
break;
|
||||
}
|
||||
|
||||
// This means that the connection was established, but closed before this thread could run again.
|
||||
if (m_state == Reset) return err(ECONNABORTED);
|
||||
|
||||
check(m_state == Connected);
|
||||
check(m_peer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user