summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net.c b/net.c
index f7d291b..9fe80bb 100644
--- a/net.c
+++ b/net.c
@@ -55,7 +55,7 @@
void __redisSetError(redisContext *c, int type, const char *str);
static void redisContextCloseFd(redisContext *c) {
- if (c && c->fd > 0) {
+ if (c && c->fd >= 0) {
close(c->fd);
c->fd = -1;
}