mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
Kernel: Detect some outgoing TCP connection failures
This commit is contained in:
parent
bd6d2c0819
commit
fc3667c026
Notes:
sideshowbarker
2024-07-19 12:46:31 +09:00
Author: https://github.com/deoxxa
Commit: fc3667c026
Pull-request: https://github.com/SerenityOS/serenity/pull/429
3 changed files with 46 additions and 1 deletions
|
@ -274,6 +274,8 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh
|
|||
if (current->block<Thread::ConnectBlocker>(description) == Thread::BlockResult::InterruptedBySignal)
|
||||
return KResult(-EINTR);
|
||||
ASSERT(setup_state() == SetupState::Completed);
|
||||
if (has_error())
|
||||
return KResult(-ECONNREFUSED);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue