diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index 81da82cab320eff1582ce0a1f0c76ce44f564235..85857bc3efd668d16bd129f366f2c06cc13dbb5c 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -1637,3 +1637,16 @@ virNetServerClientGetInfo(virNetServerClientPtr client, virObjectUnlock(client); return ret; } + + +/** + * virNetServerClientSetQuietEOF: + * + * Don't report errors for protocols that close connection by hangup of the + * socket rather than calling an API to close it. + */ +void +virNetServerClientSetQuietEOF(virNetServerClientPtr client) +{ + virNetSocketSetQuietEOF(client->sock); +} diff --git a/src/rpc/virnetserverclient.h b/src/rpc/virnetserverclient.h index a53cc00b206e33e6dc2f97b4752b6f57ec5111fe..e45c78882ef72be3312fa207f7f9218233005e5a 100644 --- a/src/rpc/virnetserverclient.h +++ b/src/rpc/virnetserverclient.h @@ -152,4 +152,6 @@ int virNetServerClientGetInfo(virNetServerClientPtr client, bool *readonly, char **sock_addr, virIdentityPtr *identity); +void virNetServerClientSetQuietEOF(virNetServerClientPtr client); + #endif /* __VIR_NET_SERVER_CLIENT_H__ */