Skip to content

Commit

Permalink
Use member initialization list for rpc_timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
  • Loading branch information
hikinggrass committed Oct 2, 2023
1 parent 1184b6d commit 8e6cf60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class RPCRequest {
nlohmann::json params;
};

RPC::RPC(int ipc_fd, const CommandApi::Config& config) : ipc_fd(ipc_fd) {
RPC::RPC(int ipc_fd, const CommandApi::Config& config) :
ipc_fd(ipc_fd), rpc_timeout(std::chrono::milliseconds(config.controller_rpc_timeout_ms)) {
this->api = std::make_unique<CommandApi>(config, *this);
this->rpc_timeout = std::chrono::milliseconds(config.controller_rpc_timeout_ms);
}

void RPC::run(const NotificationHandler& notification_handler) {
Expand Down

0 comments on commit 8e6cf60

Please sign in to comment.