提交 c1c3e9b7 编写于 作者: A antirez

Better error reporting when fd event creation fails.

上级 1f8ad7ae
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册