diff --git a/examples/server/server.cpp b/examples/server/server.cpp index c3c10078e..82c3e199e 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -33,7 +33,7 @@ using json = nlohmann::ordered_json; -constexpr int HTTP_POOLING_SECONDS = 1; +constexpr int HTTP_POLLING_SECONDS = 1; enum stop_type { STOP_TYPE_NONE, @@ -2353,7 +2353,7 @@ struct server_context { const std::function & is_connection_closed) { std::vector results(id_tasks.size()); for (size_t i = 0; i < id_tasks.size(); i++) { - server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POOLING_SECONDS); + server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POLLING_SECONDS); if (is_connection_closed()) { cancel_tasks(id_tasks); @@ -2391,7 +2391,7 @@ struct server_context { const std::function & is_connection_closed) { size_t n_finished = 0; while (true) { - server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POOLING_SECONDS); + server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POLLING_SECONDS); if (is_connection_closed()) { cancel_tasks(id_tasks); diff --git a/examples/server/tests/unit/test_completion.py b/examples/server/tests/unit/test_completion.py index a4690aca3..c1fc12462 100644 --- a/examples/server/tests/unit/test_completion.py +++ b/examples/server/tests/unit/test_completion.py @@ -423,6 +423,6 @@ def test_cancel_request(): except requests.exceptions.ReadTimeout: pass # expected # make sure the slot is free - time.sleep(1) # wait for HTTP_POOLING_SECONDS + time.sleep(1) # wait for HTTP_POLLING_SECONDS res = server.make_request("GET", "/slots") assert res.body[0]["is_processing"] == False