Commit ab6e7774 authored by Rusty Russell's avatar Rusty Russell

io: don't close if already closing in io_close_other.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent f7ab2c65
......@@ -490,8 +490,11 @@ struct io_plan io_close_cb(struct io_conn *conn, void *arg)
void io_close_other(struct io_conn *conn)
{
conn->plan = io_close_();
backend_plan_changed(conn);
/* Don't close if already closing! */
if (conn->plan.next) {
conn->plan = io_close_();
backend_plan_changed(conn);
}
}
/* Exit the loop, returning this (non-NULL) arg. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment