Skip to content

Commit

Permalink
Bug fix for #1323
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Jan 9, 2018
1 parent 11aac95 commit a7699e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ProxySQL_Cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ void * ProxySQL_Cluster_Monitor_thread(void *args) {
} else {
sleep(1); // do not monitor if the username is empty
}
rc_bool = GloProxyCluster->Update_Node_Metrics(node->hostname, node->port, NULL, 0); // added extra check, see #1323
}
__exit_monitor_thread:
if (conn)
Expand Down Expand Up @@ -1113,7 +1114,13 @@ bool ProxySQL_Cluster_Nodes::Update_Node_Metrics(char * _h, uint16_t _p, MYSQL_R
std::unordered_map<uint64_t, ProxySQL_Node_Entry *>::iterator ite = umap_proxy_nodes.find(hash_);
if (ite != umap_proxy_nodes.end()) {
ProxySQL_Node_Entry * node = ite->second;
node->set_metrics(_r, _response_time);
if (_r) {
node->set_metrics(_r, _response_time);
} else {
// if _r is NULL, this function is being called only to verify if
// the node should still be checked or not
// see bug #1323
}
ret = true;
}
pthread_mutex_unlock(&mutex);
Expand Down

0 comments on commit a7699e8

Please sign in to comment.