diff options
author | Matt Stancliff <matt@genges.com> | 2014-04-07 15:44:47 -0400 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2014-04-08 19:37:45 -0400 |
commit | e35266e68fa2f9a292639eb7e499eace226101d0 (patch) | |
tree | be1f70ba816d55a2c9391a38240f5af787bb48ab | |
parent | 7f0c7a29fd4d0f0623db522501c2b66eb8ebb94d (diff) |
Stop redisCheckSocketError from more than checking
redisCheckSocketError should only CheckSocketError and not
close any misbehaving sockets. If CheckSocketError discovers
a problem, the caller will discover the contest is in ERR
and will start destroying the context (which involves
finalizing all callbacks (which may still be using
fd for something, so we should not close fd until all
callbacks have been told we are failing) and eventually
close the fd in redisFree() immediately before the
context is released).
-rw-r--r-- | net.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -226,14 +226,12 @@ int redisCheckSocketError(redisContext *c) { if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, &err, &errlen) == -1) { __redisSetErrorFromErrno(c,REDIS_ERR_IO,"getsockopt(SO_ERROR)"); - redisContextCloseFd(c); return REDIS_ERR; } if (err) { errno = err; __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL); - redisContextCloseFd(c); return REDIS_ERR; } |