| 272 | } |
| 273 | |
| 274 | void send_disconnected(struct daemon *daemon, |
| 275 | const struct node_id *id, |
| 276 | u64 connectd_counter, |
| 277 | struct timemono starttime) |
| 278 | { |
| 279 | /* lightningd: it's gone */ |
| 280 | daemon_conn_send(daemon->master, |
| 281 | take(towire_connectd_peer_disconnected(NULL, id, connectd_counter, time_to_nsec(timemono_since(starttime))))); |
| 282 | |
| 283 | /* Tell gossipd to stop asking this peer gossip queries */ |
| 284 | daemon_conn_send(daemon->gossipd, |
| 285 | take(towire_gossipd_peer_gone(NULL, id))); |
| 286 | |
| 287 | /* Start reconnection process if we care */ |
| 288 | schedule_reconnect_if_important(daemon, id); |
| 289 | } |
| 290 | |
| 291 | /*~ Note the lack of static: this is called by peer_exchange_initmsg.c once the |
| 292 | * INIT messages are exchanged, and also by the retry code above. */ |
no test coverage detected