From f9f0f3c2e5f1a5359df366e71ac6fab83e229464 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 12 Apr 2017 11:14:30 +0200 Subject: Fixing on check of joinable threads Change-Id: Iac78cd1ff0254cd6871afee1bc70f8dee8d42d1c Signed-off-by: Mauro Sardara --- icnet/transport/icnet_socket_producer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/icnet/transport/icnet_socket_producer.cc b/icnet/transport/icnet_socket_producer.cc index 9a870e5c..994488a0 100644 --- a/icnet/transport/icnet_socket_producer.cc +++ b/icnet/transport/icnet_socket_producer.cc @@ -48,7 +48,10 @@ ProducerSocket::ProducerSocket(Name prefix) ProducerSocket::~ProducerSocket() { processing_thread_stop_ = true; portal_->stopEventsLoop(); - processing_thread_.join(); + + if (processing_thread_.joinable()) { + processing_thread_.join(); + } if (listening_thread_.joinable()) { listening_thread_.join(); -- cgit 1.2.3-korg