~ Once they've connected in, stop trying to connect out (if we were). */
| 186 | |
| 187 | /*~ Once they've connected in, stop trying to connect out (if we were). */ |
| 188 | static void peer_connected_in(struct daemon *daemon, |
| 189 | struct io_conn *conn, |
| 190 | const struct node_id *id) |
| 191 | { |
| 192 | struct connecting *connect = find_connecting(daemon, id); |
| 193 | |
| 194 | if (!connect) |
| 195 | return; |
| 196 | |
| 197 | /* Don't call destroy_io_conn, since we're done. */ |
| 198 | io_set_finish(connect->conn, NULL, NULL); |
| 199 | |
| 200 | /* Now free the 'connecting' struct since we succeeded. */ |
| 201 | tal_free(connect); |
| 202 | } |
| 203 | |
| 204 | /*~ When we free a peer, we remove it from the daemon's hashtable. |
| 205 | * We also call this manually if we want to elegantly drain peer's |
no test coverage detected