def METHOD_NAME(self):
    server = ('rotate.aprs.net',
              'cwop.aprs.net')[self.fixed_data['passcode'] == '-1']
    # give up after 50 seconds as there'll be new data to send instead
    timeout = time.time() + 50
    try:
        while True:
            try:
                with self.connect(server) as METHOD_NAME:
                    response = METHOD_NAME.recv(4096).decode('ASCII')
                    logger.debug('server software: %s', response.strip())
                    yield METHOD_NAME, 'OK'
                    break
            except socket.timeout:
                if time.time() > timeout:
                    raise
    except Exception as ex:
        logger.error(str(ex))
        yield None, repr(ex)