mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Kernel: Remove the Socket::{protocol,}connect ShouldBlock argument
This argument is always set to description.is_blocking(), but description is also given as a separate argument, so there's no point to piping it through separately.
This commit is contained in:
parent
2aaaee6744
commit
364f6a9bf0
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/IdanHo
Commit: 364f6a9bf0
Pull-request: https://github.com/SerenityOS/serenity/pull/14578
10 changed files with 13 additions and 18 deletions
|
@ -420,7 +420,7 @@ ErrorOr<void> TCPSocket::protocol_listen(bool did_allocate_port)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> TCPSocket::protocol_connect(OpenFileDescription& description, ShouldBlock should_block)
|
||||
ErrorOr<void> TCPSocket::protocol_connect(OpenFileDescription& description)
|
||||
{
|
||||
MutexLocker locker(mutex());
|
||||
|
||||
|
@ -444,7 +444,7 @@ ErrorOr<void> TCPSocket::protocol_connect(OpenFileDescription& description, Shou
|
|||
|
||||
evaluate_block_conditions();
|
||||
|
||||
if (should_block == ShouldBlock::Yes) {
|
||||
if (description.is_blocking()) {
|
||||
locker.unlock();
|
||||
auto unblock_flags = Thread::FileBlocker::BlockFlags::None;
|
||||
if (Thread::current()->block<Thread::ConnectBlocker>({}, description, unblock_flags).was_interrupted())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue