Exit on thread restart limit reached.

remotes/origin/master-1.1.x
Victor Julien 15 years ago
parent 8f4229b429
commit 92ea1f68d4

@ -1383,11 +1383,9 @@ void TmThreadPauseThreads()
static void TmThreadRestartThread(ThreadVars *tv) static void TmThreadRestartThread(ThreadVars *tv)
{ {
if (tv->restarted >= THV_MAX_RESTARTS) { if (tv->restarted >= THV_MAX_RESTARTS) {
printf("Warning: thread restarts exceeded threshhold limit for thread" SCLogError(SC_ERR_TM_THREADS_ERROR,"thread restarts exceeded "
"\"%s\"\n", tv->name); "threshold limit for thread \"%s\"", tv->name);
/* makes sense to reset the tv_aof to engine_exit?! */ exit(EXIT_FAILURE);
// tv->aof = THV_ENGINE_EXIT;
return;
} }
TmThreadsUnsetFlag(tv, THV_CLOSED); TmThreadsUnsetFlag(tv, THV_CLOSED);
@ -1399,8 +1397,7 @@ static void TmThreadRestartThread(ThreadVars *tv)
} }
tv->restarted++; tv->restarted++;
SCLogInfo("thread \"%s\" restarted\n", tv->name); SCLogInfo("thread \"%s\" restarted", tv->name);
return; return;
} }

Loading…
Cancel
Save