Analysis of the linear algorithm for consensus on complex networks shows the existence of two distinct phases, the asymptotic and the transient. The network reaches the asymptotic when the components corresponding to the spectral gap eigenvalue of the weighted graph laplacian become dominating. However, in cases of changing graph topology the transit to asymptotic convergence is slow. Therefore, the entire spectrum affects the rate of convergence. Hence, we propose an adaptive nonlinear algorithm for consensus that allows for better performance during the transient phase.