Drop the MAX_CONNS macro and define TCP_CONNECTION_LIMIT, TCP_POLL_CAPACITY, TCP_EVENT_CAPACITY instead

This commit is contained in:
2025-11-22 22:59:32 +01:00
parent 582893be70
commit e1fa3729c6
10 changed files with 54 additions and 31 deletions
+4 -4
View File
@@ -15,8 +15,8 @@
int metadata_server_main(int argc, char **argv)
{
void *contexts[MAX_CONNS+1];
struct pollfd polled[MAX_CONNS+1];
void *contexts[TCP_POLL_CAPACITY];
struct pollfd polled[TCP_POLL_CAPACITY];
int num_polled;
int timeout = -1;
MetadataServer state;
@@ -37,8 +37,8 @@ int metadata_server_main(int argc, char **argv)
int chunk_server_main(int argc, char **argv)
{
void *contexts[MAX_CONNS+1];
struct pollfd polled[MAX_CONNS+1];
void *contexts[TCP_POLL_CAPACITY];
struct pollfd polled[TCP_POLL_CAPACITY];
int num_polled;
int timeout = -1;
ChunkServer state;