Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix thread race in MTRXPCListenerSampleTests. (#26862)
WARNING: ThreadSanitizer: race on NSMutableDictionary (pid=72050) Modifying access of NSMutableDictionary at 0x7b0800149020 by thread T7: #0 -[__NSDictionaryM setObject:forKey:] <null>:2 (CoreFoundation:x86_64+0x40d4e) #1 -[MTRXPCListenerSample listener:shouldAcceptNewConnection:] MTRXPCListenerSampleTests.m:116 (MatterTests:x86_64+0x48437b) #2 service_connection_handler_make_connection <null>:2 (Foundation:x86_64+0xdea93) Previous modifying access of NSMutableDictionary at 0x7b0800149020 by thread T4: #0 -[__NSDictionaryM removeObjectForKey:] <null>:2 (CoreFoundation:x86_64+0x6cd6d) #1 __59-[MTRXPCListenerSample listener:shouldAcceptNewConnection:]_block_invoke MTRXPCListenerSampleTests.m:119 (MatterTests:x86_64+0x484630)
- Loading branch information