Commit aed86122 authored by Samarth Joshi's avatar Samarth Joshi

Fixed client msg recieve ev.data.fd

parent 34ad384c
......@@ -106,6 +106,8 @@ void *worker(void *args) {
fflush(stdout);
read(read_pipe, newfd, sizeof(newfd));
printf("\nread %d", *newfd);
ev.events = EPOLLIN;
ev.data.fd = *newfd;
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, *newfd, &ev) == -1) {
perror("epoll_ctl: read_pipe");
exit(EXIT_FAILURE);
......
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