reset the connection on failure so that we don't get stuck in a weird state