Skip to content
Permalink
Browse files

Fix daemon startup parameter '--limit-rate' processing after paramete…

…r defaults
  • Loading branch information...
rbrunner7 committed Mar 20, 2019
1 parent f2f725d commit 85f2f8c933c7167e04b7b0d7042fbcace3847cc1
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/p2p/net_node.inl
@@ -2236,11 +2236,10 @@ namespace nodetool
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)
{
this->islimitup=true;
this->islimitup=(limit != -1) && (limit != default_limit_up);

if (limit==-1) {
limit=default_limit_up;
this->islimitup=false;
}

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>
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) {
limit=default_limit_down;
this->islimitdown=false;
}
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");

0 comments on commit 85f2f8c

Please sign in to comment.
You can’t perform that action at this time.