File descriptors can be 0

This commit is contained in:
Pieter Noordhuis 2014-04-09 22:56:16 -07:00
parent a9c21e4d48
commit 8332a88393

2
net.c
View File

@ -55,7 +55,7 @@
void __redisSetError(redisContext *c, int type, const char *str); void __redisSetError(redisContext *c, int type, const char *str);
static void redisContextCloseFd(redisContext *c) { static void redisContextCloseFd(redisContext *c) {
if (c && c->fd > 0) { if (c && c->fd >= 0) {
close(c->fd); close(c->fd);
c->fd = -1; c->fd = -1;
} }