We probably should DRY this up a little, and instead `try`/`except` in a loop rather than just trying to re-connect once again using identical code in the `except` block.