Rewrite reconnect logic to actually somewhat work