Skip to content

Commit 24d0177

Browse files
committed
use actual number of received messages github#68
1 parent 35b3902 commit 24d0177

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/samplers/statsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ static void statsd_run_recvmmsg(struct brubeck_statsd *statsd, int sock)
5151
}
5252

5353
/* store stats */
54-
brubeck_atomic_add(&statsd->sampler.inflow, SIM_PACKETS);
54+
brubeck_atomic_add(&statsd->sampler.inflow, res);
5555

56-
for (i = 0; i < SIM_PACKETS; ++i) {
56+
for (i = 0; i < res; ++i) {
5757
char *buf = msgs[i].msg_hdr.msg_iov->iov_base;
5858
char *end = buf + msgs[i].msg_len;
5959
brubeck_statsd_packet_parse(server, buf, end);

0 commit comments

Comments
 (0)