summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ff2894)
raw | patch | inline | side by side (parent: 1ff2894)
author | Scott Sanders <scott@jssjr.com> | |
Fri, 18 Nov 2011 16:11:35 +0000 (11:11 -0500) | ||
committer | Scott Sanders <scott@jssjr.com> | |
Fri, 18 Nov 2011 16:11:35 +0000 (11:11 -0500) |
This is certainly no worse than the previous usage of
pthread_mutex_lock, and will prevent the plugin from blocking. I'd like
to add better handling of failed locks in future commits.
pthread_mutex_lock, and will prevent the plugin from blocking. I'd like
to add better handling of failed locks in future commits.
src/write_graphite.c | patch | blob | history |
diff --git a/src/write_graphite.c b/src/write_graphite.c
index 57933e8dc3c518f77fa5f1aa72b6ba82f12b8436..8b5afb812bb62c47fe24af4378a10700db23ae99 100644 (file)
--- a/src/write_graphite.c
+++ b/src/write_graphite.c
status,
strerror (errno));
- pthread_mutex_lock (&cb->send_lock);
+ pthread_mutex_trylock (&cb->send_lock);
DEBUG ("write_graphite plugin: closing socket and restting fd "
"so reinit will occur");