def METHOD_NAME(self, fd, reason):
    if self.disconnected:
        return
    if reason.value.__class__ == error.ConnectionDone:
        # Normal close
        if fd == "read":
            self._readConnectionLost(reason)
        else:
            self._writeConnectionLost(reason)
    else:
        self.connectionLost(reason)