def _cancel_fd_ops(self, errfileno):
        if errfileno == self.socket.fileno():
            thesplog('SELECT FATAL ERROR ON MAIN LISTEN SOCKET',
                     level=logging.ERROR)
            raise RuntimeError('Fatal listen socket error; aborting')

        if errfileno in self._incomingSockets:
            incoming = self._incomingSockets[errfileno]
            del self._incomingSockets[errfileno]
            incoming = self._handlePossibleIncoming(incoming, errfileno,
                                                    closed=True)
            if incoming:
                self._incomingSockets[incoming.socket.fileno()] = incoming
            return
        if self._processIntents(errfileno, closed=True):
            return
        if self._waitingTransmits:
            W = self._waitingTransmits.pop(0)
            if self._nextTransmitStepCheck(W, errfileno, closed=True):
                self._waitingTransmits.append(W)
            return
        closed_openSocks = []
        for I in getattr(self, '_openSockets', {}):
            if self._socketFile(self._openSockets[I]) == errfileno:
                closed_openSocks.append(I)
        for each in closed_openSocks:
            del self._openSockets[each]
dataset/ETHPy150Open godaddy/Thespian/thespian/system/transport/TCPTransport.py/TCPTransport._cancel_fd_ops/original