Skip to content

Commit

Permalink
core: stop cyclic registration thread before sending last (un)registr…
Browse files Browse the repository at this point in the history
…ation message and udp socket shutdown (fixing #1141)
  • Loading branch information
rex-schilasky authored and FlorianReimold committed Jul 20, 2023
1 parent b14e418 commit 1674121
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ecal/core/src/ecal_registration_provider.cpp
Expand Up @@ -114,6 +114,7 @@ namespace eCAL
}
#endif

// start cyclic registration thread
m_reg_sample_snd_thread.Start(Config::GetRegistrationRefreshMs(), std::bind(&CRegistrationProvider::RegisterSendThread, this));

m_created = true;
Expand All @@ -123,9 +124,12 @@ namespace eCAL
{
if(!m_created) return;

m_reg_sample_snd.reset();
// stop cyclic registration thread
m_reg_sample_snd_thread.Stop();

// destroy registration sample sender
m_reg_sample_snd.reset();

#ifndef ECAL_LAYER_ICEORYX
if(m_use_shm_monitoring)
{
Expand Down

0 comments on commit 1674121

Please sign in to comment.