def close(self): """Notifies the control channel when the data connection closes.""" c = self.control_channel try: if c is not None and c.connected and not self.reported: self.reportDefault() finally: self.control_channel = None DualModeChannel.close(self) if c is not None: c.closedData()