One is finished. Maybe wake up a waiter */
| 850 | |
| 851 | /* One is finished. Maybe wake up a waiter */ |
| 852 | static void destroy_live_command(struct command *cmd) |
| 853 | { |
| 854 | struct askrene *askrene = get_askrene(cmd->plugin); |
| 855 | struct getroutes_info *info; |
| 856 | |
| 857 | assert(askrene->num_live_requests > 0); |
| 858 | askrene->num_live_requests--; |
| 859 | |
| 860 | if (askrene->num_live_requests >= askrene->max_children) |
| 861 | return; |
| 862 | |
| 863 | info = list_pop(&askrene->waiters, struct getroutes_info, list); |
| 864 | if (info) |
| 865 | begin_request(askrene, info); |
| 866 | } |
| 867 | |
| 868 | static struct command_result *begin_request(struct askrene *askrene, |
| 869 | struct getroutes_info *info) |
nothing calls this directly
no test coverage detected