simplify the runtime Register reconnect logic

Refactor the Register code a little bit to make it easier to comprehend.
Merge pull request #2750 from jpoimboe/simplify-register-reconnect

Simplify the runtime Register reconnect logic