From 72e52b998c7e7f9dbdc36d54be0217d959fe0fe6 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Wed, 29 Dec 2021 16:41:46 +0100 Subject: [PATCH] Added check of shouldStop in RsThreadedTcpSocket::run --- libretroshare/src/pqi/rstcpsocket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/rstcpsocket.cc b/libretroshare/src/pqi/rstcpsocket.cc index f42f100a2..f9bf03483 100644 --- a/libretroshare/src/pqi/rstcpsocket.cc +++ b/libretroshare/src/pqi/rstcpsocket.cc @@ -84,7 +84,7 @@ RsThreadedTcpSocket::RsThreadedTcpSocket() : RsTcpSocket() } void RsThreadedTcpSocket::run() { - while(connectionState() == CONNECTED) + while(!shouldStop() && connectionState() == CONNECTED) { tick(); std::this_thread::sleep_for(std::chrono::milliseconds(200));