add synchronization to reconnect process.