Browse Source

Fix #34 Ring buffer bug

Yann Weber 4 years ago
parent
commit
7efd83ce00
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/stats.c

+ 1
- 0
src/stats.c View File

@@ -6,6 +6,7 @@ static void pyfcgi_stats_add_sample(pyfcgi_stats_sample_t* samples, int sample)
6 6
 {
7 7
 	samples->samples[samples->cur] = sample;
8 8
 	samples->cur++;
9
+	samples->cur %= PYFCGI_STATS_SZ;
9 10
 }
10 11
 
11 12
 int pyfcgi_stats_init()

Loading…
Cancel
Save