提交 21a2d1b6 编写于 作者: P Peter Krempa

rpc: serverclient: Add option to suppress errors on EOF

The protocol may not use an explicit API to close the connection and
just close the socket instead. Add option to suppress errors in such
case.
上级 494c302c
......@@ -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);
}
......@@ -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__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册