File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ class DeviceControllerSystemState
208
208
mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr &&
209
209
mSessionKeystore != nullptr && mSessionResumptionStorage != nullptr && mBDXTransferServer != nullptr ;
210
210
};
211
- bool IsShutDown () { return mHaveShutDown ; }
211
+ bool IsShutDown () const { return mHaveShutDown ; }
212
212
213
213
System::Layer * SystemLayer () const { return mSystemLayer ; };
214
214
Inet::EndPointManager<Inet::TCPEndPoint> * TCPEndPointManager () const { return mTCPEndPointManager ; };
Original file line number Diff line number Diff line change @@ -889,11 +889,10 @@ - (void)resetOperationalAdvertising
889
889
// If we're not advertising, then there's no need to reset anything.
890
890
VerifyOrReturn (_advertiseOperational);
891
891
892
- // If there are no running controllers there will be no advertisements to reset.
893
- {
894
- std::lock_guard lock (_controllersLock);
895
- VerifyOrReturn (_controllers.count > 0 );
896
- }
892
+ // Ensure the stack is running. We can't look at _controllers to determine this
893
+ // reliably because it gets updated early during controller startup from off-queue.
894
+ auto systemState = _controllerFactory->GetSystemState ();
895
+ VerifyOrReturn (systemState != nullptr && !systemState->IsShutDown ());
897
896
898
897
// StartServer() is the only API we have for resetting DNS-SD advertising.
899
898
// It sure would be nice if there were a "restart" that was a no-op if the
You can’t perform that action at this time.
0 commit comments