File descriptors can be 0
This commit is contained in:
parent
a9c21e4d48
commit
8332a88393
2
net.c
2
net.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user