Except for a reconnection, we finally free a peer when the io_conn * is closed and all subds are gone. */
| 84 | /* Except for a reconnection, we finally free a peer when the io_conn |
| 85 | * is closed and all subds are gone. */ |
| 86 | static void maybe_free_peer(struct peer *peer) |
| 87 | { |
| 88 | if (peer->to_peer) |
| 89 | return; |
| 90 | if (tal_count(peer->subds) != 0) |
| 91 | return; |
| 92 | status_debug("maybe_free_peer freeing peer!"); |
| 93 | tal_free(peer); |
| 94 | } |
| 95 | |
| 96 | /* We try to send the final messages, but if buffer is full and they're |
| 97 | * not reading, we have to give up. */ |
no test coverage detected