Signed-off-by: Felix Fietkau <nbd@nbd.name>
DC(3, cl, "Invalid message type %d", msg->type);
break;
}
+
+ if (cl->rx_fd < 0)
+ return;
+
+ close(cl->rx_fd);
+ cl->rx_fd = -1;
}
static void client_fd_cb(struct uloop_fd *fd, unsigned int events)
msg.msg_controllen = cmsg->cmsg_len;
retry:
+ *pfd = -1;
if (fd->eof) {
client_free(cl);
return;
r->cl = cl;
r->id = msg->id;
r->fd = cl->rx_fd;
+ cl->rx_fd = -1;
r->ring_size = msg->ring_size;
r->data_size = msg->data_size;
list_add_tail(&r->list, &cl->bufs);