- fprintf(stderr, "Could not connect to Redis at %s:%d: %s", config.hostip, config.hostport, err);
+ fprintf(stderr,"Could not connect to Redis at ");
+ if (config.hostsocket == NULL)
+ fprintf(stderr,"%s:%d: %s",config.hostip,config.hostport,err);
+ else
+ fprintf(stderr,"%s: %s",config.hostsocket,err);