Skip to content

Commit 5873417

Browse files
committed
Use epoll
1 parent 705599b commit 5873417

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/multimaster/sockhub/sockhub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ void ShubLoop(Shub* shub)
323323
if (rc > 0) {
324324
#ifdef USE_EPOLL
325325
int j;
326-
for (j = 0; j < rc; j++) {
326+
int n = rc;
327+
for (j = 0; j < n; j++) {
327328
i = events[j].data.fd;
328329
fprintf(stderr, "events[j].events=%d, events[j].data.fd=%d\n", events[j].events, events[j].data.fd);
329330
if (events[j].events & EPOLLERR) {

0 commit comments

Comments
 (0)