Skip to content

Commit

Permalink
signal worker sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Dec 8, 2016
1 parent d98120e commit 672a808
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tests/util/channel_test.c
Expand Up @@ -297,6 +297,16 @@ static void *channel_worker(void *arg)
fr_time_t now;
fr_channel_t *new_channel;

/*
* Because we ACK all of the requests
* immediately, we have to signal the master
* before we're sleeping.xb
*/
if (fr_channel_worker_sleeping(channel) < 0) {
fprintf(stderr, "Failed signalling worker sleeping!\n");
exit(1);
}

MPRINT1("\tWorker waiting on events.\n");

rcode = kevent(kq_worker, NULL, 0, events, MAX_KEVENTS, NULL);
Expand Down

0 comments on commit 672a808

Please sign in to comment.