about summary refs log tree commit homepage
path: root/queue_epoll.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-20 01:51:09 +0000
committerEric Wong <normalperson@yhbt.net>2013-06-20 02:38:07 +0000
commit16e31f8dce64323fdef6151a30756ce2bc770a88 (patch)
tree9dd368a9b0e0cd80283652e5477b6fc1ab0e9722 /queue_epoll.c
parent91cb86eb03d828bda8a4ac9cd0c3edbac73418af (diff)
downloadcmogstored-wip-1.3.tar.gz
Simply releasing the descriptor triggering ENOSPC/ENOMEM errors from
epoll_ctl and kevent is not good enough, as those descriptors may
have other descriptors (e.g. files to be served) hanging off of them.
Diffstat (limited to 'queue_epoll.c')
-rw-r--r--queue_epoll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/queue_epoll.c b/queue_epoll.c
index aaa30f6..e6d36d5 100644
--- a/queue_epoll.c
+++ b/queue_epoll.c
@@ -160,7 +160,7 @@ epoll_ctl_error(struct mog_queue *q, struct mog_fd *mfd)
         case ENOMEM:
         case ENOSPC:
                 syslog(LOG_ERR, "epoll_ctl: %m, dropping file descriptor");
-                mog_fd_put(mfd);
+                mog_queue_drop(mfd);
                 return;
         default:
                 syslog(LOG_ERR, "unhandled epoll_ctl() error: %m");