projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git]
/
src
/
statsd.c
diff --git
a/src/statsd.c
b/src/statsd.c
index
610391b
..
54b6e94
100644
(file)
--- a/
src/statsd.c
+++ b/
src/statsd.c
@@
-562,6
+562,7
@@
static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */
if (tmp == NULL)
{
ERROR ("statsd plugin: realloc failed.");
if (tmp == NULL)
{
ERROR ("statsd plugin: realloc failed.");
+ close (fd);
continue;
}
fds = tmp;
continue;
}
fds = tmp;
@@
-940,8
+941,6
@@
static int statsd_shutdown (void) /* {{{ */
void *key;
void *value;
void *key;
void *value;
- pthread_mutex_lock (&metrics_lock);
-
if (network_thread_running)
{
network_thread_shutdown = 1;
if (network_thread_running)
{
network_thread_shutdown = 1;
@@
-950,6
+949,8
@@
static int statsd_shutdown (void) /* {{{ */
}
network_thread_running = 0;
}
network_thread_running = 0;
+ pthread_mutex_lock (&metrics_lock);
+
while (c_avl_pick (metrics_tree, &key, &value) == 0)
{
sfree (key);
while (c_avl_pick (metrics_tree, &key, &value) == 0)
{
sfree (key);