struct CitContext *this;
this = CreateNewContext();
+ CtdlThreadSleep(1);
this->kill_me = 1;
this->state = CON_IDLE;
dead_session_purge(1);
{
long stats = statcount;
- while(stats) {
+ while(stats && !CtdlThreadCheckStop()) {
CtdlThreadCreate("Connection simulation worker", CTDLTHREAD_BIGSTACK, simulation_worker, NULL);
stats--;
}
#ifdef THREADS_USESIGNALS
if (CtdlThreadGetCount() && CT->state > CTDL_THREAD_STOP_REQ)
#else
- if (CtdlThreadGetCount() && !statcount)
+ if (CtdlThreadGetCount())
#endif
CtdlThreadSleep(1);
}