ccan/io: make union more generic.
[ccan] / ccan / io / poll.c
index 31a56600fe487b836e8bf1b8bdb88ecfa75953e0..f15644025cf3fdb756e2e1e20bb53935f02f7b64 100644 (file)
@@ -175,7 +175,8 @@ bool add_duplex(struct io_conn *c)
 void backend_del_conn(struct io_conn *conn)
 {
        if (conn->finish) {
-               errno = conn->plan.u.close.saved_errno;
+               /* Saved by io_close */
+               errno = conn->plan.u1.s;
                conn->finish(conn, conn->finish_arg);
        }
        if (timeout_active(conn))