summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eecd71c)
raw | patch | inline | side by side (parent: eecd71c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 12 Jan 2016 07:21:24 +0000 (08:21 +0100) |
src/write_redis.c | patch | blob | history |
diff --git a/src/write_redis.c b/src/write_redis.c
index da5b7bbe8ba1ffa84ddae9ab8e2fc5325c7a69ad..231738c5bc6993e6c25b0f66dcc1c53a635ba4b0 100644 (file)
--- a/src/write_redis.c
+++ b/src/write_redis.c
value_size = sizeof (value);
value_ptr = &value[0];
status = format_values (value_ptr, value_size, ds, vl, /* store rates = */ 0);
- pthread_mutex_lock (&node->lock);
if (status != 0)
return (status);
+ pthread_mutex_lock (&node->lock);
+
if (node->conn == NULL)
{
node->conn = redisConnectWithTimeout ((char *)node->host, node->port, node->timeout);