Added check of shouldStop in RsThreadedTcpSocket::run

This commit is contained in:
thunder2 2021-12-29 16:41:46 +01:00
parent 02afc9062f
commit 72e52b998c

View File

@ -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));