| 124 | } |
| 125 | |
| 126 | static void jcon_remove_json_stream(struct json_connection *jcon, |
| 127 | struct json_stream *js) |
| 128 | { |
| 129 | for (size_t i = 0; i < tal_count(jcon->js_arr); i++) { |
| 130 | if (js != jcon->js_arr[i]) |
| 131 | continue; |
| 132 | |
| 133 | tal_arr_remove(&jcon->js_arr, i); |
| 134 | return; |
| 135 | } |
| 136 | abort(); |
| 137 | } |
| 138 | |
| 139 | /* jcon and cmd have separate lifetimes: we detach them on either destruction */ |
| 140 | static void destroy_jcon(struct json_connection *jcon) |
no test coverage detected