diff --git a/src/lib/io/io.h b/src/lib/io/io.h index b54a7b4b6c98..0e50c96fc5de 100644 --- a/src/lib/io/io.h +++ b/src/lib/io/io.h @@ -42,6 +42,7 @@ typedef struct fr_listen fr_listen_t; */ typedef enum fr_io_action_t { FR_IO_ACTION_RUN, + FR_IO_ACTION_DUP, FR_IO_ACTION_DONE, } fr_io_action_t; diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index 3b801d973f61..7372de70a05d 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -887,12 +887,23 @@ static REQUEST *fr_worker_get_request(fr_worker_t *worker, fr_time_t now) * * @todo - fix the channel code to do queue * depth, and not sequence / ack. - * - * @todo - send DUP signal to old request! */ if (old->async->recv_time == request->async->recv_time) { fr_channel_null_reply(request->async->channel); talloc_free(request); + + /* + * Signal there's a dup, and ignore the + * return code. We don't bother replying + * here, as an FD event or timer will + * wake up the request, and cause it to + * continue. + * + * @todo - the old request is NOT + * running, but is yielded. It MAY clean + * itself up, or do something... + */ + (void) old->async->process(old, FR_IO_ACTION_DUP); return NULL; }