Change wait_for_socket sleep