diff options
Diffstat (limited to 'src/peers.c')
| -rw-r--r-- | src/peers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/peers.c b/src/peers.c index 781bc7e..6d23fff 100644 --- a/src/peers.c +++ b/src/peers.c @@ -105,6 +105,7 @@ int add_peer(struct infohash* infohash, struct addr* peer, time_t now) { peer_status.peers++; prom_counter_inc(peers, NULL); + prom_gauge_set(current_hashes, (double)peer_table_load, NULL); return 0; } @@ -155,6 +156,9 @@ void expire_hashes(time_t now) { // Remove the slot entry->set = false; + peer_table_load--; prom_counter_inc(hash_expired, NULL); } + + prom_gauge_set(current_hashes, (double)peer_table_load, NULL); } |
