diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index 64e91d3890108426018ffd3d91cd725d5720d4bb..56ca23bb6c97bafd6973fcd578e64ba704cb5eab 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -1540,7 +1540,7 @@ virNetServerClientStartKeepAlive(virNetServerClientPtr client) /* The connection might have been closed before we got here and thus the * keepalive object could have been removed too. */ - if (!client->sock) { + if (!client->keepalive) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); goto cleanup;