aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-04-12 11:14:30 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-04-12 11:14:30 +0200
commitf9f0f3c2e5f1a5359df366e71ac6fab83e229464 (patch)
treec98ec7fd4a8644cac2dfece872f3046750210302
parentb1021744ba2d43e60027f59aa6c12949591a8ddb (diff)
Fixing on check of joinable threads
Change-Id: Iac78cd1ff0254cd6871afee1bc70f8dee8d42d1c Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r--icnet/transport/icnet_socket_producer.cc5
1 files changed, 4 insertions, 1 deletions
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();