def wait_for_disconnect(self, timeout=60):
    test_function = (lambda : (not self.is_connected))
    wait_until(test_function, timeout=timeout, lock=mininode_lock)
def wait_for_disconnect(self, timeout=60):
    test_function = (lambda : (not self.is_connected))
    wait_until(test_function, timeout=timeout, lock=mininode_lock)