Commit 51a51fd7 authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

quit http_server if poll fails

parent 21de6559
......@@ -467,7 +467,7 @@ int serve_clients(struct global_state* state)
if(ret <0) {
perror("poll");
result = errno;
goto failed_poll;
server_quit(state);
} else if (is_running(state)) {
if(try_accept(state, client)) {
perror("try_accept");
......@@ -475,7 +475,6 @@ int serve_clients(struct global_state* state)
server_quit(state);
};
}
failed_poll:
free(client);
}
failed_to_alloc_client:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment