about summary refs log tree commit homepage
path: root/mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mgmt.c')
-rw-r--r--mgmt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mgmt.c b/mgmt.c
index 9909d27..3468e24 100644
--- a/mgmt.c
+++ b/mgmt.c
@@ -82,6 +82,16 @@ MOG_NOINLINE static void mgmt_close(struct mog_fd *mfd)
         mog_fd_put(mfd);
 }
 
+/* called if epoll/kevent is out-of-space */
+void mog_mgmt_drop(struct mog_fd *mfd)
+{
+        struct mog_mgmt *mgmt = &mfd->as.mgmt;
+
+        if (mgmt->forward && mgmt->forward != MOG_IOSTAT)
+                mog_file_close(mgmt->forward);
+        mgmt_close(mfd);
+}
+
 void mog_mgmt_writev(struct mog_mgmt *mgmt, struct iovec *iov, int iovcnt)
 {
         struct mog_fd *mfd = mog_fd_of(mgmt);