More DRY and clean solution for reconnecting with remote.

Signed-off-by: Daniel (dmilith) Dettlaff <dmilith@verknowsys.com>