add wait_until_closed, use on attached server detach, fixes subsequent server creations