Skip to content

Commit

Permalink
Make the condition of lalb::Disabled be _base_weight < 0
Browse files Browse the repository at this point in the history
  • Loading branch information
zyearn committed Jun 27, 2019
1 parent 6e39f03 commit d4cc3f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brpc/policy/locality_aware_load_balancer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class LocalityAwareLoadBalancer : public LoadBalancer {
void Describe(std::ostream& os, int64_t now);

int64_t Disable();
bool Disabled() const { return _base_weight == -1; }
bool Disabled() const { return _base_weight < 0; }
int64_t MarkOld(size_t index);
std::pair<int64_t, int64_t> ClearOld();

Expand Down

0 comments on commit d4cc3f3

Please sign in to comment.