Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Jan 17, 2025
1 parent 8ebe9b2 commit bdc22d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2353,7 +2353,7 @@ struct server_context {
const std::function<bool()> & is_connection_closed) {
std::vector<server_task_result_ptr> 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);
Expand Down Expand Up @@ -2391,7 +2391,7 @@ struct server_context {
const std::function<bool()> & 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);
Expand Down
2 changes: 1 addition & 1 deletion examples/server/tests/unit/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bdc22d6

Please sign in to comment.