[libvirt] [PATCH] Don't crash if a connection closes early