summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hiredis.c b/hiredis.c
index ca4cd88..8848def 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -642,15 +642,10 @@ static redisContext *redisContextInit() {
return c;
}
-void redisDisconnect(redisContext *c) {
- close(c->fd);
- c->flags &= ~REDIS_CONNECTED;
-}
-
void redisFree(redisContext *c) {
/* Disconnect before free'ing if not yet disconnected. */
if (c->flags & REDIS_CONNECTED)
- redisDisconnect(c);
+ close(c->fd);
if (c->error != NULL)
sdsfree(c->error);
if (c->obuf != NULL)