Project

General

Profile

Feature #9330 » 0002-socket-avoid-redundant-calls-to-rb_update_max_fd.patch

normalperson (Eric Wong), 12/31/2013 11:22 AM

View differences:

ext/socket/init.c
fd = rsock_socket0(domain, type, proto);
}
}
if (0 <= fd)
rb_update_max_fd(fd);
return fd;
}
......
}
rb_sys_fail("accept(2)");
}
rb_update_max_fd(fd2);
make_fd_nonblock(fd2);
return rsock_init_sock(rb_obj_alloc(klass), fd2);
}
......
}
rb_sys_fail("accept(2)");
}
rb_update_max_fd(fd2);
if (!klass) return INT2NUM(fd2);
if (!klass) {
rb_update_max_fd(fd2);
return INT2NUM(fd2);
}
return rsock_init_sock(rb_obj_alloc(klass), fd2);
}
(2-2/3)