basically if a file descriptor is first only used for reading (EPOLLIN) and later on switches to reading and writing (EPOLLOUT), there's currently no way to modify the epoll set as EPOLL_CTL_ADD is used unconditionally (but it should be EPOLL_CTL_MOD). Full details here: https://bugs.swift.org/browse/SR-3360