diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-04-19 23:07:36 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-05-05 16:25:48 +0200 |
commit | 9703b1b3dc59aa76a314373fff748e26bdd0466f (patch) | |
tree | 65dc67b62bfc8c4659a35d6139089af7d1ca75ad /deps/hiredis/example.c | |
parent | 5af302011c80076447403b454c781cf210d1d715 (diff) | |
download | redis-9703b1b3dc59aa76a314373fff748e26bdd0466f.tar.gz |
Update hiredis
Diffstat (limited to 'deps/hiredis/example.c')
-rw-r--r-- | deps/hiredis/example.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/hiredis/example.c b/deps/hiredis/example.c index 2506f39cd..90ff9ed5e 100644 --- a/deps/hiredis/example.c +++ b/deps/hiredis/example.c @@ -9,7 +9,8 @@ int main(void) { redisContext *c; redisReply *reply; - c = redisConnect((char*)"127.0.0.1", 6379); + struct timeval timeout = { 1, 500000 }; // 1.5 seconds + c = redisConnectWithTimeout((char*)"127.0.0.2", 6379, timeout); if (c->err) { printf("Connection error: %s\n", c->errstr); exit(1); |