aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-19 18:00:24 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-19 18:12:46 +0800
commit362615c9c4301877de9d543b470ef5994c237a4b (patch)
tree768b0d17fa836a3e96250c395dcf0f622fc1354b /test
parent7454a766b37951674095afdd0c8573713e2511a4 (diff)
downloaddexon-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')
-rw-r--r--test/RPCSession.cpp3
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
}