From ceb14d0ba5dd1b09f829601b59359d89a6cf126d Mon Sep 17 00:00:00 2001 From: "Josh V [Apple]" Date: Fri, 7 Jan 2022 10:18:17 -0800 Subject: [PATCH] Do not remove event handler when called. (#13351) --- examples/placeholder/linux/include/TestCommand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index 2ef81055b8b59b..373a96a264fa66 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -74,11 +74,11 @@ class TestCommand { case chip::DeviceLayer::DeviceEventType::kCommissioningComplete: ChipLogProgress(chipTool, "Commissioning complete"); - chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, arg); TestCommand * command = reinterpret_cast(arg); command->isRunning = true; command->NextTest(); + chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, arg); break; } }