Merge pull request #5910 from ethereum/rpcsession-close

Shutdown IPC socket gracefully in RPCSession
This commit is contained in:
Alex Beregszaszi 2019-01-31 13:55:55 +00:00 committed by GitHub
commit e83e9a81e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,10 @@ class IPCSocket: public boost::noncopyable
public: public:
explicit IPCSocket(std::string const& _path); explicit IPCSocket(std::string const& _path);
std::string sendRequest(std::string const& _req); 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; } std::string const& path() const { return m_path; }