| 1799 | } |
| 1800 | |
| 1801 | static int handle_cancel(struct io_uring *ring, struct io_uring_cqe *cqe) |
| 1802 | { |
| 1803 | struct conn *c = cqe_to_conn(cqe); |
| 1804 | int fd = cqe_to_fd(cqe); |
| 1805 | |
| 1806 | c->pending_cancels--; |
| 1807 | |
| 1808 | vlog("%d: got cancel fd %d, refs %d\n", c->tid, fd, c->pending_cancels); |
| 1809 | |
| 1810 | if (!c->pending_cancels) { |
| 1811 | queue_shutdown_close(ring, c, c->in_fd); |
| 1812 | if (c->out_fd != -1) |
| 1813 | queue_shutdown_close(ring, c, c->out_fd); |
| 1814 | io_uring_submit(ring); |
| 1815 | } |
| 1816 | |
| 1817 | return 0; |
| 1818 | } |
| 1819 | |
| 1820 | static void open_socket(struct conn *c) |
| 1821 | { |
no test coverage detected