Use a default timeout of -1 when metadata_server_step and chunk_server_step don't set an explicit one

This commit is contained in:
2025-11-11 11:38:00 +01:00
parent 641c1999ad
commit d598ccedb2
+5
View File
@@ -25,6 +25,8 @@ int metadata_server_main(int argc, char **argv)
if (num_polled < 0) return -1;
for (;;) {
POLL(polled, num_polled, timeout);
timeout = -1;
num_polled = metadata_server_step(
&state, contexts, polled, num_polled, &timeout);
if (num_polled < 0) return -1;
@@ -44,7 +46,10 @@ int chunk_server_main(int argc, char **argv)
&state, argc, argv, contexts, polled, &timeout);
if (num_polled < 0) return -1;
for (;;) {
POLL(polled, num_polled, timeout);
timeout = -1;
num_polled = chunk_server_step(
&state, contexts, polled, num_polled, &timeout);
if (num_polled < 0) return -1;