connection class no longer invokes the disconnect callback twice and can now adequately check when it can perform request