Commit 23563f6
Linux/Dnssd: StopResolve detaches resolves before invoking cancel callbacks (#43393)
* Linux/Dnssd: StopResolve now synchronously delivers CHIP_ERROR_CANCELLED to matching pending resolve callbacks and removes their contexts to avoid later callbacks firing on stale/unused work.
* Removing the entry from mAllocatedResolves first (capture the pointer, erase it, then invoke the callback and finally Delete)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactored to detach contexts from mAllocatedResolves before invoking the cancelled callbacks and deleting.
* simplified list removal with remove_if
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 743f157 commit 23563f6
1 file changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
842 | | - | |
843 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
844 | 855 | | |
845 | | - | |
| 856 | + | |
846 | 857 | | |
847 | | - | |
848 | | - | |
| 858 | + | |
| 859 | + | |
849 | 860 | | |
850 | | - | |
851 | | - | |
852 | 861 | | |
853 | 862 | | |
854 | 863 | | |
| |||
0 commit comments