Change server connection logic.