Skip to content

Commit

Permalink
fix: bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Jan 19, 2024
1 parent d41cb25 commit b16dd22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/clienthandler_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ int ClientHandlerPrivate::on_message_complete(llhttp_t* parser)
}
}
catch (const std::exception& e) {
std::cerr << std::format(
"Error handling the request {} {}: {}: {}\n", llhttp_method_name(method), path, typeid(e).name(), e.what()
);
std::cerr << std::format("Error handling the request {} {}: {}\n", llhttp_method_name(method), path, e.what());
client->generate_text_response(HTTP_STATUS_INTERNAL_SERVER_ERROR);
}

Expand Down
2 changes: 1 addition & 1 deletion src/clienthandler_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ClientHandlerPrivate {

int accept(int fd);

static constexpr ev_tstamp READ_TIMEOUT = 15000;
static constexpr ev_tstamp READ_TIMEOUT = 15;

private:
ClientHandler* q_ptr;
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main()
return 0;
}
catch (const std::exception& e) {
std::cerr << std::format("FATAL ERROR: {}: {}\n", typeid(e).name(), e.what());
std::cerr << std::format("FATAL ERROR: {}\n", e.what());
return 1;
}
}

0 comments on commit b16dd22

Please sign in to comment.