From 06d7e900c084b9209355a9f5229bcad263f4a157 Mon Sep 17 00:00:00 2001 From: Karsten Sperling Date: Wed, 27 Sep 2023 16:06:40 +1300 Subject: [PATCH] Darwin: invalidate MTRDevice work queue --- src/darwin/Framework/CHIP/MTRDevice.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 17c311d86d9c0c..2ed4a67c4e6bd7 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -246,6 +246,9 @@ - (void)setDelegate:(id)delegate queue:(dispatch_queue_t)queu - (void)invalidate { MTR_LOG_INFO("%@ invalidate", self); + + [_asyncWorkQueue invalidate]; + os_unfair_lock_lock(&self->_lock); _weakDelegate = nil;