quick and dirty fix for hiredis bug creating problem with the new redis-cli connect commmand. Also change prompt when redis-cli is not connected

This commit is contained in:
antirez
2010-11-29 12:20:17 +01:00
parent efcf948c1a
commit d8d528e992
2 changed files with 2 additions and 1 deletions

View File

@ -664,6 +664,7 @@ void __redisSetError(redisContext *c, int type, const sds errstr) {
static redisContext *redisContextInit() {
redisContext *c = calloc(sizeof(redisContext),1);
c->fd = -1; /* quick fix for a bug that should be addressed differently */
c->err = 0;
c->errstr = NULL;
c->obuf = sdsempty();