mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
cosmetic change (keep lib free of UxPlay mentions in case of re-use)
make NOHOLD feature a #define item
This commit is contained in:
@@ -172,7 +172,8 @@ httpd_accept_connection(httpd_t *httpd, int server_fd, int is_ipv6)
|
||||
local = netutils_get_address(&local_saddr, &local_len);
|
||||
remote = netutils_get_address(&remote_saddr, &remote_len);
|
||||
|
||||
/* for uxplay, remove existing connections to make way for new connections:
|
||||
#ifdef NOHOLD
|
||||
/* remove existing connections to make way for new connections:
|
||||
* this will only occur if max_connections > 2 */
|
||||
if (httpd->open_connections >= 2) {
|
||||
logger_log(httpd->logger, LOGGER_INFO, "Destroying current connections to allow connection by new client");
|
||||
@@ -184,7 +185,8 @@ httpd_accept_connection(httpd_t *httpd, int server_fd, int is_ipv6)
|
||||
httpd_remove_connection(httpd, connection);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ret = httpd_add_connection(httpd, fd, local, local_len, remote, remote_len);
|
||||
if (ret == -1) {
|
||||
shutdown(fd, SHUT_RDWR);
|
||||
|
||||
Reference in New Issue
Block a user