fix intermintent hang on remote server disconnect
This commit is contained in:
@@ -191,6 +191,10 @@ app_config::app_config(provider_type prov, std::string_view data_directory)
|
||||
}},
|
||||
{fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_API_PORT),
|
||||
[this]() { return std::to_string(get_remote_config().api_port); }},
|
||||
{fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_CONNECT_TIMEOUT_MS),
|
||||
[this]() {
|
||||
return std::to_string(get_remote_config().conn_timeout_ms);
|
||||
}},
|
||||
{fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_ENCRYPTION_TOKEN),
|
||||
[this]() { return get_remote_config().encryption_token; }},
|
||||
{fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_HOST_NAME_OR_IP),
|
||||
@@ -484,6 +488,15 @@ app_config::app_config(provider_type prov, std::string_view data_directory)
|
||||
return std::to_string(get_remote_config().api_port);
|
||||
},
|
||||
},
|
||||
{
|
||||
fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_CONNECT_TIMEOUT_MS),
|
||||
[this](const std::string &value) {
|
||||
auto cfg = get_remote_config();
|
||||
cfg.conn_timeout_ms = utils::string::to_uint32(value);
|
||||
set_remote_config(cfg);
|
||||
return std::to_string(get_remote_config().conn_timeout_ms);
|
||||
},
|
||||
},
|
||||
{
|
||||
fmt::format("{}.{}", JSON_REMOTE_CONFIG, JSON_ENCRYPTION_TOKEN),
|
||||
[this](const std::string &value) {
|
||||
|
Reference in New Issue
Block a user