Use shutdown function when num_requests are done

The quitting event won't fire when all requests are done.