diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-19 18:00:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-19 18:12:46 +0800 |
commit | 362615c9c4301877de9d543b470ef5994c237a4b (patch) | |
tree | 768b0d17fa836a3e96250c395dcf0f622fc1354b /test/RPCSession.cpp | |
parent | 7454a766b37951674095afdd0c8573713e2511a4 (diff) | |
download | dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar.gz dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar.bz2 dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar.lz dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar.xz dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.tar.zst dexon-solidity-362615c9c4301877de9d543b470ef5994c237a4b.zip |
Close IPC socket on connect failure
Diffstat (limited to 'test/RPCSession.cpp')
-rw-r--r-- | test/RPCSession.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/RPCSession.cpp b/test/RPCSession.cpp index 72b26453..634954a3 100644 --- a/test/RPCSession.cpp +++ b/test/RPCSession.cpp @@ -74,7 +74,10 @@ IPCSocket::IPCSocket(string const& _path): m_path(_path) BOOST_FAIL("Error creating IPC socket object"); if (connect(m_socket, reinterpret_cast<struct sockaddr const*>(&saun), sizeof(struct sockaddr_un)) < 0) + { + close(m_socket); BOOST_FAIL("Error connecting to IPC socket: " << _path); + } #endif } |