- if (redisGetReply(c->context,&reply) != REDIS_OK) {
- fprintf(stderr,"Error: %s\n",c->context->errstr);
- exit(1);
- }
- if (reply != NULL) {
- if (reply == (void*)REDIS_REPLY_ERROR) {
- fprintf(stderr,"Unexpected error reply, exiting...\n");
+ while(c->pending) {
+ if (redisGetReply(c->context,&reply) != REDIS_OK) {
+ fprintf(stderr,"Error: %s\n",c->context->errstr);