Skip to content

Commit

Permalink
Mark up duplicate requests as warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jan 31, 2018
1 parent f7558ea commit 35ca0b2
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/lib/io/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ static REQUEST *fr_worker_get_request(fr_worker_t *worker, fr_time_t now)
* depth, and not sequence / ack.
*/
if (old->async->recv_time == request->async->recv_time) {
RWDEBUG("Discarding duplicate of request (%"PRIu64")", old->number);

fr_channel_null_reply(request->async->channel);
talloc_free(request);

Expand All @@ -915,8 +917,6 @@ static REQUEST *fr_worker_get_request(fr_worker_t *worker, fr_time_t now)
* running, but is yielded. It MAY clean
* itself up, or do something...
*/
request = old;
RDEBUG("received duplicate request.");
(void) old->async->process(old, FR_IO_ACTION_DUP);
return NULL;
}
Expand All @@ -925,14 +925,7 @@ static REQUEST *fr_worker_get_request(fr_worker_t *worker, fr_time_t now)
* Stop the old request, and decrement the number
* of active requests.
*/
{
REQUEST *tmp = request;

request = old;
RDEBUG("received new request %" PRIu64 " which which over-rides this one - telling old one to stop.",
tmp->number);
request = tmp;
}
RWDEBUG("Got duplicate of request (%" PRIu64 "), telling old request to stop", old->number);

worker_stop_request(worker, old, now);
rad_assert(worker->num_active > 0);
Expand Down

0 comments on commit 35ca0b2

Please sign in to comment.