summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b2a769)
raw | patch | inline | side by side (parent: 2b2a769)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 28 Nov 2015 17:37:15 +0000 (18:37 +0100) |
src/write_redis.c | patch | blob | history |
diff --git a/src/write_redis.c b/src/write_redis.c
index 1eb082fb331cfcb9496658c8e98ef4fb8e5297b4..4bfcc73d2b5b92fa61bd37e8855a6b2d2657aad9 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, node->store_rates);
- 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);