Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix/asio udp receiver destruction #1348

Closed

Conversation

rex-schilasky
Copy link
Contributor

Destructor added to shutdown socket ..

CUDPReceiverAsio::~CUDPReceiverAsio()
{
  // prepare for destruction
  m_created = false;

  // interrupt running asio io context
  m_iocontext.stop();

  // shut down socket
  asio::error_code ec;
  m_socket.shutdown(asio::ip::udp::socket::shutdown_receive, ec);
  if (ec)
  {
    std::cerr << "CUDPReceiverAsio: Shutdown asio socket failed: " << ec.message() << std::endl;
  }
}

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rex-schilasky rex-schilasky deleted the hotfix/asio-udp-receiver-destruction branch March 6, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants