diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index b45d93be9..b353cb344 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -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);