summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2014-04-09 22:56:16 -0700
committerPieter Noordhuis <pcnoordhuis@gmail.com>2014-04-09 22:56:16 -0700
commit8332a88393cc79b6f7d431859e5bbf157d8c1ea3 (patch)
treee23037a09827d0a27cee0d3cc5a188c0742f12f3
parenta9c21e4d48ecde49901e46e78ae87897fc182d52 (diff)
downloadhiredict-8332a88393cc79b6f7d431859e5bbf157d8c1ea3.tar.xz
File descriptors can be 0
-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;
}