Resolve the race condition between mDNS name registration and
cricket::Port::SignalPortComplete.
The mDNS name registration is asynchronously executed by the mDNS
responder, and a host candidate with an mDNS name is only gathered after
this completes. SignalPortComplete however is currently done
synchronously by UDPPort, and any candidate gathered by a UDPPort after
this signal is fired would be discarded.
Bug: webrtc:9964, webrtc:9605
Change-Id: If8aaf193ef26c06bd118e6418b62ba0de5e87e3c
Reviewed-on: https://webrtc-review.googlesource.com/c/109541
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Zach Stein <zstein@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25534}
diff --git a/p2p/base/stunport.h b/p2p/base/stunport.h
index dc9f0e3..ca43cbc 100644
--- a/p2p/base/stunport.h
+++ b/p2p/base/stunport.h
@@ -160,6 +160,9 @@
void OnLocalAddressReady(rtc::AsyncPacketSocket* socket,
const rtc::SocketAddress& address);
+
+ void PostAddAddress(bool is_final) override;
+
void OnReadPacket(rtc::AsyncPacketSocket* socket,
const char* data,
size_t size,