From c1c3e9b756e36dcde62f4429ec254d838f0f51cf Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 3 Jan 2013 14:22:55 +0100 Subject: [PATCH] Better error reporting when fd event creation fails. --- src/networking.c | 4 +++- src/replication.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/networking.c b/src/networking.c index 4365bc8e..c23939c5 100644 --- a/src/networking.c +++ b/src/networking.c @@ -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; } diff --git a/src/replication.c b/src/replication.c index 720cd4c1..162aa20e 100644 --- a/src/replication.c +++ b/src/replication.c @@ -636,7 +636,9 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) { if (aeCreateFileEvent(server.el,fd, AE_READABLE,readSyncBulkPayload,NULL) == AE_ERR) { - redisLog(REDIS_WARNING,"Can't create readable event for SYNC"); + redisLog(REDIS_WARNING, + "Can't create readable event for SYNC: %s (fd=%d)", + strerror(errno),fd); goto error; } -- GitLab