Based on the previous commits by @mgmachado but simplified.
I also changed the threshold to error after a single attempt as the
connection has likely been borked and the user should be in the know if
they couldn't reconnect after 5 seconds.
Closes#1791