From 7d9db1fc227b7f51619dbc12ffc89053f2eacd6f Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 30 Aug 2019 21:44:05 +0200 Subject: [PATCH] added destructor in RsTickingThread calling for fullstop, which prevents the crash due to threads being killed when still running --- libretroshare/src/util/rsthreads.cc | 4 ++++ libretroshare/src/util/rsthreads.h | 1 + 2 files changed, 5 insertions(+) diff --git a/libretroshare/src/util/rsthreads.cc b/libretroshare/src/util/rsthreads.cc index e474633f7..414e0dac6 100644 --- a/libretroshare/src/util/rsthreads.cc +++ b/libretroshare/src/util/rsthreads.cc @@ -236,6 +236,10 @@ RsTickingThread::RsTickingThread() #endif } +RsTickingThread::~RsTickingThread() +{ + fullstop(); +} void RsSingleJobThread::runloop() { run() ; diff --git a/libretroshare/src/util/rsthreads.h b/libretroshare/src/util/rsthreads.h index 15c776e64..920450615 100644 --- a/libretroshare/src/util/rsthreads.h +++ b/libretroshare/src/util/rsthreads.h @@ -287,6 +287,7 @@ class RsTickingThread: public RsThread { public: RsTickingThread(); + virtual ~RsTickingThread(); void shutdown(); void fullstop();