mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
Merge pull request #5322
85f2f8c9
Fix daemon startup parameter '--limit-rate' processing after parameter defaults (rbrunner7)
This commit is contained in:
commit
13f414cb9f
1 changed files with 2 additions and 4 deletions
|
@ -2236,11 +2236,10 @@ namespace nodetool
|
||||||
template<class t_payload_net_handler>
|
template<class t_payload_net_handler>
|
||||||
bool node_server<t_payload_net_handler>::set_rate_up_limit(const boost::program_options::variables_map& vm, int64_t limit)
|
bool node_server<t_payload_net_handler>::set_rate_up_limit(const boost::program_options::variables_map& vm, int64_t limit)
|
||||||
{
|
{
|
||||||
this->islimitup=true;
|
this->islimitup=(limit != -1) && (limit != default_limit_up);
|
||||||
|
|
||||||
if (limit==-1) {
|
if (limit==-1) {
|
||||||
limit=default_limit_up;
|
limit=default_limit_up;
|
||||||
this->islimitup=false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
epee::net_utils::connection<epee::levin::async_protocol_handler<p2p_connection_context> >::set_rate_up_limit( limit );
|
epee::net_utils::connection<epee::levin::async_protocol_handler<p2p_connection_context> >::set_rate_up_limit( limit );
|
||||||
|
@ -2251,10 +2250,9 @@ namespace nodetool
|
||||||
template<class t_payload_net_handler>
|
template<class t_payload_net_handler>
|
||||||
bool node_server<t_payload_net_handler>::set_rate_down_limit(const boost::program_options::variables_map& vm, int64_t limit)
|
bool node_server<t_payload_net_handler>::set_rate_down_limit(const boost::program_options::variables_map& vm, int64_t limit)
|
||||||
{
|
{
|
||||||
this->islimitdown=true;
|
this->islimitdown=(limit != -1) && (limit != default_limit_down);
|
||||||
if(limit==-1) {
|
if(limit==-1) {
|
||||||
limit=default_limit_down;
|
limit=default_limit_down;
|
||||||
this->islimitdown=false;
|
|
||||||
}
|
}
|
||||||
epee::net_utils::connection<epee::levin::async_protocol_handler<p2p_connection_context> >::set_rate_down_limit( limit );
|
epee::net_utils::connection<epee::levin::async_protocol_handler<p2p_connection_context> >::set_rate_down_limit( limit );
|
||||||
MINFO("Set limit-down to " << limit << " kB/s");
|
MINFO("Set limit-down to " << limit << " kB/s");
|
||||||
|
|
Loading…
Reference in a new issue