Better error reporting when fd event creation fails.

This commit is contained in:
antirez
2013-01-03 14:22:55 +01:00
parent 1f8ad7ae55
commit c1c3e9b756
2 changed files with 6 additions and 2 deletions

View File

@ -517,7 +517,9 @@ void copyClientOutputBuffer(redisClient *dst, redisClient *src) {
static void acceptCommonHandler(int fd, int flags) {
redisClient *c;
if ((c = createClient(fd)) == NULL) {
redisLog(REDIS_WARNING,"Error allocating resources for the client");
redisLog(REDIS_WARNING,
"Error registering fd event for the new client: %s (fd=%d)",
strerror(errno),fd);
close(fd); /* May be already closed, just ignore errors */
return;
}