mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
dev_disconnect: support multiple disconnects in the same daemon.
We currently assume the daemon gives up; gossipd won't, and we want to test it there too. This reveals a bug (returning io_close() is bad if the call is to duplex()), and breaks a test which now continues after dropping a packet.. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
6ceec17943
commit
2273ce783e
@@ -346,7 +346,8 @@ struct io_plan *peer_write_message(struct io_conn *conn,
|
||||
|
||||
switch (dev_disconnect(type)) {
|
||||
case DEV_DISCONNECT_BEFORE:
|
||||
return io_close(conn);
|
||||
dev_sabotage_fd(io_conn_fd(conn));
|
||||
break;
|
||||
case DEV_DISCONNECT_DROPPKT:
|
||||
pcs->out = NULL; /* FALL THRU */
|
||||
case DEV_DISCONNECT_AFTER:
|
||||
|
||||
Reference in New Issue
Block a user