udp-multicast: remove the thread from the multicast thread API (#6685)

* udp-multicast: remove the thread from the multicast thread API

The whole API is parallel & asynchronous we don't need to start a thread ourself,
the implementation probably does when we call start listening already.

* Take copilot advice and call it a handler

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Jorropo
2025-04-30 12:52:42 +02:00
committed by GitHub
parent 216fbf2343
commit a7ef9e9c08
5 changed files with 12 additions and 21 deletions

View File

@@ -293,8 +293,8 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
}
#if HAS_UDP_MULTICAST
if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p));
if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpHandler->onSend(const_cast<meshtastic_MeshPacket *>(p));
}
#endif