face: Connect faces to the parent (unicast) or associated (multicast) channels
Change-Id: Ie7b2e8fb60050a2bc6e4f5ad053c26e121f3c3d5
Refs: #4973
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 4776661..f2ccb9c 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -188,6 +188,7 @@
auto transport = make_unique<UnicastUdpTransport>(std::move(socket), params.persistency,
m_idleFaceTimeout);
auto face = make_shared<Face>(std::move(linkService), std::move(transport));
+ face->setChannel(shared_from_this()); // use weak_from_this() in C++17
m_channelFaces[remoteEndpoint] = face;
connectFaceClosedSignal(*face, [this, remoteEndpoint] { m_channelFaces.erase(remoteEndpoint); });