dev_disconnect: new option to stop using connection, but don't close.

This allows us to ensure a packet is read by the other end, but we
don't read anything else from them or write anything to them.

Using '+' is similar, but because it closes the connection, the peer
might notice before receiving the packet (such as if it does a write).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-06-15 06:37:36 +09:30
parent 0fccfc0a9a
commit 62e1e2467c
5 changed files with 33 additions and 11 deletions

View File

@@ -67,7 +67,7 @@ void status_fmt(enum log_level level,
}
#if DEVELOPER
void dev_sabotage_fd(int fd)
void dev_sabotage_fd(int fd, bool close_fd)
{
abort();
}