diff options
| author | Zheng Chao <[email protected]> | 2022-11-29 18:10:07 +0800 |
|---|---|---|
| committer | Zheng Chao <[email protected]> | 2022-11-29 18:10:07 +0800 |
| commit | e19de4ab3592690e3d0a54447b088ad38aa48683 (patch) | |
| tree | a4abcba5393186512dd7abf4e489ccf3695bfd44 | |
| parent | 305abfa82ca92f179272a8f22578a63bd7408dc7 (diff) | |
Include duplicated connnections to the network statistics.
| -rw-r--r-- | src/swarmkv_keyspace.c | 2 | ||||
| -rw-r--r-- | src/swarmkv_net.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/swarmkv_keyspace.c b/src/swarmkv_keyspace.c index 874c9e5..66c90b5 100644 --- a/src/swarmkv_keyspace.c +++ b/src/swarmkv_keyspace.c @@ -764,7 +764,7 @@ void consul_watch_leadership_changes_async(struct swarmkv_keyspace* ks) } void __watch_slots_changes_cb(struct evhttp_request *req, void *arg) { - struct swarmkv_keyspace* ks=(struct swarmkv_keyspace*)arg; + struct swarmkv_keyspace *ks=(struct swarmkv_keyspace*)arg; cJSON *metadata_array=NULL, *metadata=NULL, *value=NULL, *modify_idx=NULL; int resp_code=0; int i=0; diff --git a/src/swarmkv_net.c b/src/swarmkv_net.c index fbab23b..f7b4e68 100644 --- a/src/swarmkv_net.c +++ b/src/swarmkv_net.c @@ -770,7 +770,7 @@ void swarmkv_net_info(struct swarmkv_net *net, struct snet_info *info) for(size_t i=0; i<net->n_thread; i++) { thr=net->threads+i; - info->connections += HASH_COUNT(thr->conn_table); + info->connections += (HASH_COUNT(thr->conn_table) + HASH_COUNT(thr->duplicated_conn_table)); info->pending_rpcs += HASH_COUNT(thr->rpc_table); info->timed_out_rpcs += thr->stat.timed_out_rpcs; info->input_bytes += thr->stat.input_bytes; |
