Handle reconnect logic better to (hopefully) avoid duplicate connections