Redo connection logic