I'm not sure if this is accidental or by design, but as both the read and write filters use a single epoll instance, an FD cannot currently be registered for both.
My proposed fix here is to use multiple epoll FDs for the different filters. An alternative approach would be to use a common surrogate knote which is referenced by the read and write filters. The surrogate maintains the state of FD in in epoll, and deletes both read/write knotes if epoll reports an error.