Set server_pid only if the server is ready