Shutdown IPC socket gracefully in RPCSession

This commit is contained in:
Alex Beregszaszi 2019-01-30 13:57:19 +00:00
parent ddab3f06a5
commit b1cb949a4b

View File

@ -57,7 +57,10 @@ class IPCSocket: public boost::noncopyable
public:
explicit IPCSocket(std::string const& _path);
std::string sendRequest(std::string const& _req);
~IPCSocket() { close(m_socket); }
~IPCSocket() {
shutdown(m_socket, SHUT_RDWR);
close(m_socket);
}
std::string const& path() const { return m_path; }