mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
Kernel: Fix checking BlockResult
We now have BlockResult::WokeNormally and BlockResult::NotBlocked, both of which indicate no error. We can no longer just check for BlockResult::WokeNormally and assume anything else must be an interruption.
This commit is contained in:
parent
1493dd9dc6
commit
419703a1f2
Notes:
sideshowbarker
2024-07-19 05:02:33 +09:00
Author: https://github.com/tomuta
Commit: 419703a1f2
Pull-request: https://github.com/SerenityOS/serenity/pull/2721
Reviewed-by: https://github.com/awesomekling
7 changed files with 56 additions and 27 deletions
|
@ -372,7 +372,7 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh
|
|||
m_direction = Direction::Outgoing;
|
||||
|
||||
if (should_block == ShouldBlock::Yes) {
|
||||
if (Thread::current()->block<Thread::ConnectBlocker>(description) != Thread::BlockResult::WokeNormally)
|
||||
if (Thread::current()->block<Thread::ConnectBlocker>(description).was_interrupted())
|
||||
return KResult(-EINTR);
|
||||
ASSERT(setup_state() == SetupState::Completed);
|
||||
if (has_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue