send at least one empty discovery message if have previously announced universes
This commit is contained in:
parent
053339d2d1
commit
15ad9a565b
|
@ -35,6 +35,7 @@ Source::Source(UUID::uuid cid)
|
|||
: Component(cid)
|
||||
, discovery_future_(discovery_exitSignal_.get_future())
|
||||
, discovery_worker_(&Source::discovery_loop_, this)
|
||||
, sendNullDiscovery(false)
|
||||
{
|
||||
fctn_ = "OpenLCP sACN Source";
|
||||
}
|
||||
|
@ -105,7 +106,14 @@ void Source::discoveryAnnounce()
|
|||
/// > sending E1.31 Universe Discovery Packets until such time that it
|
||||
/// > resumes transmission of E1.31 Data and/or Synchronization information.
|
||||
if (universes_.empty())
|
||||
return;
|
||||
{
|
||||
if (sendNullDiscovery)
|
||||
sendNullDiscovery = false;
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
sendNullDiscovery = true;
|
||||
|
||||
// framing layer header
|
||||
auto frmheader = std::make_shared<EXTENDED::discovery_header>();
|
||||
|
|
|
@ -80,6 +80,10 @@ private:
|
|||
std::future<void> discovery_future_;
|
||||
std::thread discovery_worker_;
|
||||
void discovery_loop_();
|
||||
|
||||
/// After terminating all universes, at least one empty universe
|
||||
/// discovery message should be sent.
|
||||
bool sendNullDiscovery;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue