mirror of
https://github.com/wownero/lwsf-wow.git
synced 2026-10-17 15:31:32 +02:00
Adjust rpc timeouts
This commit is contained in:
+2
-2
@@ -41,7 +41,7 @@ namespace lwsf { namespace config
|
||||
};
|
||||
|
||||
constexpr const std::size_t bulletproof_version = 4;
|
||||
constexpr const std::chrono::seconds connect_timeout{5};
|
||||
constexpr const std::chrono::seconds connect_timeout{10};
|
||||
constexpr const std::chrono::seconds daemon_status_cache{10};
|
||||
constexpr const std::string_view default_account_name{"Untitled account"};
|
||||
constexpr const lookahead default_lookahead{50, 200};
|
||||
@@ -57,5 +57,5 @@ namespace lwsf { namespace config
|
||||
constexpr const std::uint32_t mixin_default = 15;
|
||||
constexpr const std::chrono::seconds refresh_interval{30};
|
||||
constexpr const std::chrono::seconds refresh_interval_min{5};
|
||||
constexpr const std::chrono::seconds rpc_timeout{5};
|
||||
constexpr const std::chrono::seconds rpc_timeout{30};
|
||||
}} // lwsf // config
|
||||
|
||||
@@ -98,6 +98,12 @@ namespace lwsf { namespace internal { namespace rpc
|
||||
{"Content-Type", "application/json; charset=utf-8"}
|
||||
};
|
||||
|
||||
if (!client.is_connected())
|
||||
{
|
||||
if (client.connect(config::connect_timeout))
|
||||
return {error::no_response};
|
||||
}
|
||||
|
||||
const epee::net_utils::http::http_response_info* response = nullptr;
|
||||
if (!client.invoke(endpoint, "POST", {reinterpret_cast<const char*>(payload.data()), payload.size()}, config::rpc_timeout, std::addressof(response), headers))
|
||||
return {error::no_response};
|
||||
|
||||
@@ -31,5 +31,5 @@ set(lwsf-wire_headers variant.h)
|
||||
|
||||
add_library(lwsf-wire-wrapper ${lwsf-wire_sources} ${lwsf-wire_headers})
|
||||
target_include_directories(lwsf-wire-wrapper PUBLIC "${LMDB_INCLUDE}")
|
||||
target_link_libraries(lwsf-wire-wrapper PRIVATE monero::libraries)
|
||||
target_link_libraries(lwsf-wire-wrapper PRIVATE lwsf-wire monero::libraries)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user