summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-01-03 14:22:55 +0100
committerantirez <antirez@gmail.com>2013-01-03 14:32:11 +0100
commitc1c3e9b756e36dcde62f4429ec254d838f0f51cf (patch)
tree56b76525702ce8837c8a3d180f21b24840b78087
parent1f8ad7ae5532f760760985031292c4f7af92a3d0 (diff)
downloadredis-c1c3e9b756e36dcde62f4429ec254d838f0f51cf.tar.gz
Better error reporting when fd event creation fails.
-rw-r--r--src/networking.c4
-rw-r--r--src/replication.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/networking.c b/src/networking.c
index 4365bc8ef..c23939c5c 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 720cd4c19..162aa20eb 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;
}