summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 113cbf0)
raw | patch | inline | side by side (parent: 113cbf0)
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 2b68e883b400ddf4d9c5cb19002dde60c89a9e83..63e89186cb3eb45a7a741304d0745851b0886317 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) {