You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
credis-test.c will segfault if a connection to the redis server cannot be made.
There is no error handling, so this is confusing to the new user. Here is a
trivial patch to fix it:
--- credis-test.c.old 2010-05-19 16:50:09.000000000 -0400
+++ credis-test.c 2010-07-18 00:58:41.508511597 -0400
@@ -73,6 +73,10 @@
int main(int argc, char **argv) {
REDIS redis = credis_connect(NULL, 0, 10000);
+ if (redis == NULL) {
+ printf("Error connecting to Redis server. Please start server to run
tests.\n");
+ exit(1);
+ }
REDIS_INFO info;
char *val, **valv, lstr[50000];
const char *keyv[] = {"kalle", "adam", "unknown", "bertil", "none"};
Original issue reported on code.google.com by aaron.hamid on 18 Jul 2010 at 5:01
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
aaron.hamid
on 18 Jul 2010 at 5:01The text was updated successfully, but these errors were encountered: