projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
113cbf0
)
write_riemann: avoid deadlock on connection failures
author
Pierre-Yves Ritschard
<pyr@spootnik.org>
Wed, 13 Apr 2016 20:17:57 +0000
(22:17 +0200)
committer
Pierre-Yves Ritschard
<pyr@spootnik.org>
Wed, 13 Apr 2016 20:17:57 +0000
(22:17 +0200)
src/write_riemann.c
patch
|
blob
|
history
diff --git
a/src/write_riemann.c
b/src/write_riemann.c
index
2b68e88
..
63e8918
100644
(file)
--- a/
src/write_riemann.c
+++ b/
src/write_riemann.c
@@
-135,8
+135,10
@@
static int wrr_send(struct riemann_host *host, riemann_message_t *msg) /* {{{ */
pthread_mutex_lock (&host->lock);
status = wrr_connect(host);
- if (status != 0)
+ if (status != 0) {
+ pthread_mutex_unlock(&host->lock);
return status;
+ }
status = riemann_client_send_message(host->client, msg);
if (status != 0) {