netkvm-prot: fix stopped state indication

Indicate stopped state only after the thread is finished.
Otherwise the structures in the memory might be unpredictably
modified.

Signed-off-by: Yuri Benditovich <[email protected]>
This commit is contained in:
Yuri Benditovich authored and Yan Vugenfirer committed 2023-07-02 12:57:58 +03:00
1 parent 9f1e4e6be3
commit 32ea737009
1 file changed
+4
@@ -704,6 +704,10 @@ protected:
{
StopThread();
m_ThreadEvent.Set();
while (IsThreadRunning())
{
Sleep(50);
}
return true;
}
virtual void ThreadProc()