'Because the client library may not actually send a packet with
sample_rate < 1, we keep trying until we get one through.'

def _send_and_get(self, sender_fn, *args, **kwargs):

    got = None
    while (not got):
        sender_fn(*args, **kwargs)
        try:
            got = self.queue.get(timeout=0.5)
        except Empty:
            pass
    return got
