code: def disconnect(self):
          
          if self.con is not None:
              self.con.close()
              log.debug('Closed connection with with set-top box at %s:%s.',
                        self.ip, self.port)
docs: Disconnect closes the connection to the Horizon box.