Skip to content

Commit

Permalink
Modules should NEVER signal an event loop to exit
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Oct 17, 2023
1 parent 995e911 commit 4e12b7f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/listen/detail/proto_detail_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,6 @@ static int mod_close_internal(proto_detail_work_thread_t *thread)
talloc_free(thread->listen);
}

if (inst->parent->exit_when_done) {
fr_event_list_t *el = main_loop_event_list();
fr_event_loop_exit(el, 1);
}

return 0;
}

Expand Down

2 comments on commit 4e12b7f

@alandekok
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention here is to allow the detail file reader to be a "one-shot' thing. i.e. read a file, and then stop.

So non-daemon mode, and also not waiting infinitely for more data.

There is no other way for a listener to signal that there's no more work to do, and the server should exit. We had discussed this use-case on Tuesday,

@arr2036
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this was added back in, in a slightly nicer way in def5134.

Please sign in to comment.