Skip to content

Commit

Permalink
Be a bit more careful about thread transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Sep 16, 2015
1 parent f3cec30 commit c83c3ae
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/process.c
Expand Up @@ -786,16 +786,20 @@ static void request_cleanup_delay_init(REQUEST *request)
if (rad_debug_lvl) printf("(%u) ********\tNEXT-STATE %s -> %s\n", request->number, __FUNCTION__, "request_cleanup_delay");
#endif
request->process = request_cleanup_delay;
request->child_state = REQUEST_CLEANUP_DELAY;

if (!we_are_master()) {
NO_CHILD_THREAD;
request->child_state = REQUEST_CLEANUP_DELAY;
}

/*
* Update this if we can, otherwise let the timers pick it up.
*/
if (we_are_master()) {
STATE_MACHINE_TIMER(FR_ACTION_TIMER);
} else {
NO_CHILD_THREAD;
}
request->child_state = REQUEST_CLEANUP_DELAY;
#ifdef HAVE_PTHREAD_H
rad_assert(request->child_pid == NO_SUCH_CHILD_PID);
#endif
STATE_MACHINE_TIMER(FR_ACTION_TIMER);
return;
}

Expand Down

0 comments on commit c83c3ae

Please sign in to comment.