diff options
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | uring.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -74,7 +74,7 @@ cfg_read(struct cfg *cfg) { FILE *cfgfile; - cfgfile = fopen("./mcproxy.conf", "r"); + cfgfile = fopen("./mcproxy.conf", "re"); if (!cfgfile) { if (errno == ENOENT) return; @@ -438,7 +438,7 @@ uring_accept(struct cfg *cfg, struct uring_task *task, struct sockaddr_in46 *add addr->addrlen = sizeof(addr->storage); uring_task_get(cfg, task); task->callback = callback; - io_uring_prep_accept(sqe, task->fd, (struct sockaddr *)&addr->storage, &addr->addrlen, 0); + io_uring_prep_accept(sqe, task->fd, (struct sockaddr *)&addr->storage, &addr->addrlen, SOCK_CLOEXEC); io_uring_sqe_set_data(sqe, task); } |