Skip to content
Snippets Groups Projects
Commit 60831ee8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

peerdiscovery: avoid crashing if message can't be sent

parent 98dbe1cb
No related branches found
No related tags found
No related merge requests found
......@@ -201,7 +201,11 @@ void
PeerDiscovery::sender_thread()
{
while(true) {
sendTo(data_send_.data(), data_send_.size());
try {
sendTo(data_send_.data(), data_send_.size());
} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
}
{
std::unique_lock<std::mutex> lck(mtx_);
if (cv_.wait_for(lck,std::chrono::seconds(3),[&]{ return !running_; }))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment