Skip to content

Commit

Permalink
Set the dispatch queue on system layer earlier in startup.
Browse files Browse the repository at this point in the history
System layer init wants to use the queue.

Fixes project-chip#21857
  • Loading branch information
bzbarsky-apple committed Aug 12, 2022
1 parent 0d64c0b commit 11ff490
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/platform/Darwin/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack()
mRunLoopSem = dispatch_semaphore_create(0);

// Ensure there is a dispatch queue available
GetWorkQueue();
static_cast<System::LayerSocketsLoop &>(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue());

// Call _InitChipStack() on the generic implementation base class
// to finish the initialization process.
Expand All @@ -70,8 +70,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack()

mStartTime = System::SystemClock().GetMonotonicTimestamp();

static_cast<System::LayerSocketsLoop &>(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue());

exit:
return err;
}
Expand Down

0 comments on commit 11ff490

Please sign in to comment.