Skip to content

Commit

Permalink
aggregator_putmetric: do not accept new input when shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
grobian committed Jul 14, 2016
1 parent aa01ea3 commit 0980c5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
race condition in aggregator leads to crash
* [Issue #195](https://github.com/grobian/carbon-c-relay/issues/195)
assertion fails when reloading config
* [Issue #200](https://github.com/grobian/carbon-c-relay/issues/200)
use after free during shutdown in aggregator
* [Issue #203](https://github.com/grobian/carbon-c-relay/issues/203)
change default connection listen backlog

Expand Down
4 changes: 4 additions & 0 deletions aggregator.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ aggregator_putmetric(
struct _aggr_bucket *bucket;
struct _aggr_bucket_entries *entries;

/* do not accept new values when shutting down, issue #200 */
if (!keep_running)
return;

/* get value */
if ((v = strchr(firstspace + 1, ' ')) == NULL) {
/* metric includes \n */
Expand Down

0 comments on commit 0980c5e

Please sign in to comment.