Skip to content

Commit 21d5ccb

Browse files
Trying out a fix in Resolver_ImplMinimalMdns file
1 parent 1c2ad2e commit 21d5ccb

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/examples-linux-tv-casting-app.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ jobs:
7575
# TODO: this test is flaky and was disabled
7676
# https://github.com/project-chip/connectedhomeip/issues/34598
7777
#
78-
# - name:
79-
# Test casting from Linux tv-casting-app to Linux tv-app -
80-
# Commissioner Generated Passcode
81-
# run: |
82-
# ./scripts/run_in_build_env.sh \
83-
# "python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True"
84-
# timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
78+
- name:
79+
Test casting from Linux tv-casting-app to Linux tv-app -
80+
Commissioner Generated Passcode
81+
run: |
82+
./scripts/run_in_build_env.sh \
83+
"python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True"
84+
timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
8585

8686
- name: Uploading Size Reports
8787
uses: ./.github/actions/upload-size-reports

src/lib/dnssd/Resolver_ImplMinimalMdns.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,17 @@ class MinMdnsResolver : public Resolver, public MdnsPacketDelegate
271271
{
272272
GlobalMinimalMdnsServer::Instance().SetResponseDelegate(this);
273273
}
274-
~MinMdnsResolver() { SetDiscoveryContext(nullptr); }
274+
~MinMdnsResolver()
275+
{
276+
// SHAO added
277+
// Remove this instance as the response delegate
278+
if (GlobalMinimalMdnsServer::Server():IsListening())
279+
{
280+
GlobalMinimalMdnsServer::Instance().SetResponseDelegate(nullptr);
281+
}
282+
//
283+
SetDiscoveryContext(nullptr);
284+
}
275285

276286
//// MdnsPacketDelegate implementation
277287
void OnMdnsPacketData(const BytesRange & data, const chip::Inet::IPPacketInfo * info) override;

0 commit comments

Comments
 (0)