hiredis
hiredis copied to clipboard
connection error
redisContext *c = redisConnect("127.0.0.1", 6379); if (c == NULL || c->err) { if (c) { printf("Error: %s\n", c->errstr); // handle error } else { printf("Can't allocate redis context\n"); } }
testing the connection on ubuntu18 but there is always an err, Can't allocate redis context.
It's really hard to say without more context.
That code runs for me just fine.
Can you post your full program along with how you're compiling it?
Thanks for your attention. I will show the whole process in the attached docx file. Wish to hear from you soon.
------------------ 原始邮件 ------------------ 发件人: "redis/hiredis" @.>; 发送时间: 2021年5月26日(星期三) 凌晨1:20 @.>; @.@.>; 主题: Re: [redis/hiredis] connection error (#955)
It's really hard to say without more context.
That code runs for me just fine.
Can you post your full program along with how you're compiling it?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Closing this since there's no activity for some time.