projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ff2894
)
Add patch from jimmyattime (issue #8)
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.
src/write_graphite.c
patch
|
blob
|
history
diff --git
a/src/write_graphite.c
b/src/write_graphite.c
index
57933e8
..
8b5afb8
100644
(file)
--- a/
src/write_graphite.c
+++ b/
src/write_graphite.c
@@
-108,7
+108,7
@@
static int wg_send_buffer (struct wg_callback *cb)
status,
strerror (errno));
- pthread_mutex_lock (&cb->send_lock);
+ pthread_mutex_
try
lock (&cb->send_lock);
DEBUG ("write_graphite plugin: closing socket and restting fd "
"so reinit will occur");