diff --git a/src/controller/rpc.cpp b/src/controller/rpc.cpp index c7436c3a..04b4db9d 100644 --- a/src/controller/rpc.cpp +++ b/src/controller/rpc.cpp @@ -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(config, *this); - this->rpc_timeout = std::chrono::milliseconds(config.controller_rpc_timeout_ms); } void RPC::run(const NotificationHandler& notification_handler) {