One is finished. Maybe wake up a waiter */
| 904 | |
| 905 | /* One is finished. Maybe wake up a waiter */ |
| 906 | static void destroy_live_command(struct command *cmd) |
| 907 | { |
| 908 | struct askrene *askrene = get_askrene(cmd->plugin); |
| 909 | struct getroutes_info *info; |
| 910 | |
| 911 | assert(askrene->num_live_requests > 0); |
| 912 | askrene->num_live_requests--; |
| 913 | |
| 914 | if (askrene->num_live_requests >= askrene->max_children) |
| 915 | return; |
| 916 | |
| 917 | info = list_pop(&askrene->waiters, struct getroutes_info, list); |
| 918 | if (info) |
| 919 | begin_request(askrene, info); |
| 920 | } |
| 921 | |
| 922 | static struct command_result *begin_request(struct askrene *askrene, |
| 923 | struct getroutes_info *info) |
nothing calls this directly
no test coverage detected