Use SO_REUSEPORT for Admin

Closes #1726 #1723 #1787
v2.0.0-improve_speed
René Cannaò 8 years ago
parent bff2a3e8d9
commit 8df4d52d0e

@ -3374,7 +3374,11 @@ __end_while_pool:
c_split_2(sn, ":" , &add, &port);
}
#ifdef SO_REUSEPORT
int s = ( atoi(port) ? listen_on_port(add, atoi(port), 128, true) : listen_on_unix(add, 128));
#else
int s = ( atoi(port) ? listen_on_port(add, atoi(port), 128) : listen_on_unix(add, 128));
#endif
if (s>0) { fds[nfds].fd=s; fds[nfds].events=POLLIN; fds[nfds].revents=0; callback_func[nfds]=0; socket_names[nfds]=strdup(sn); nfds++; }
if (add) free(add);
if (port) free(port);

Loading…
Cancel
Save