def _process(self, fileno, event):
        if fileno not in self._map:
            return

        fd = self._map[fileno]
        if fd == self._ctrl_recv:
            self._read_ctrl()
            return

        if event & self._disconnected_flag and not (event & select.POLLIN):
            self.fire(_disconnect(fd), self.getTarget(fd))
            self._poller.unregister(fileno)
            super(EPoll, self).discard(fd)
            del self._map[fileno]
        else:
            try:
                if event & select.EPOLLIN:
                    self.fire(_read(fd), self.getTarget(fd))
                if event & select.EPOLLOUT:
                    self.fire(_write(fd), self.getTarget(fd))
            except Exception as e:
                self.fire(_error(fd, e), self.getTarget(fd))
                self.fire(_disconnect(fd), self.getTarget(fd))
                self._poller.unregister(fileno)
                super(EPoll, self).discard(fd)
                del self._map[fileno]
dataset/ETHPy150Open circuits/circuits/circuits/core/pollers.py/EPoll._process/original