|
|
@ -1238,12 +1238,15 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, |
|
|
|
gpr_log(GPR_INFO, |
|
|
|
gpr_log(GPR_INFO, |
|
|
|
"Incoming server list identical to current, ignoring."); |
|
|
|
"Incoming server list identical to current, ignoring."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
grpc_grpclb_destroy_serverlist(serverlist); |
|
|
|
} else { /* new serverlist */ |
|
|
|
} else { /* new serverlist */ |
|
|
|
if (glb_policy->serverlist != NULL) { |
|
|
|
if (glb_policy->serverlist != NULL) { |
|
|
|
/* dispose of the old serverlist */ |
|
|
|
/* dispose of the old serverlist */ |
|
|
|
grpc_grpclb_destroy_serverlist(glb_policy->serverlist); |
|
|
|
grpc_grpclb_destroy_serverlist(glb_policy->serverlist); |
|
|
|
} |
|
|
|
} |
|
|
|
/* and update the copy in the glb_lb_policy instance */ |
|
|
|
/* and update the copy in the glb_lb_policy instance. This serverlist
|
|
|
|
|
|
|
|
* instance will be destroyed either upon the next update or in |
|
|
|
|
|
|
|
* glb_destroy() */ |
|
|
|
glb_policy->serverlist = serverlist; |
|
|
|
glb_policy->serverlist = serverlist; |
|
|
|
|
|
|
|
|
|
|
|
rr_handover_locked(exec_ctx, glb_policy); |
|
|
|
rr_handover_locked(exec_ctx, glb_policy); |
|
|
|