aboutsummaryrefslogtreecommitdiffstats
path: root/test/RPCSession.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-10-19 19:33:40 +0800
committerGitHub <noreply@github.com>2017-10-19 19:33:40 +0800
commit892c3ef8efeb3a79c9e11722651f430f392071c6 (patch)
tree9ddec0109967a6f3bc54f807915ad12fbea06350 /test/RPCSession.cpp
parentc58d9d2c4269a89b07b7cd10a33d806c8315c3cc (diff)
parent362615c9c4301877de9d543b470ef5994c237a4b (diff)
downloaddexon-solidity-892c3ef8efeb3a79c9e11722651f430f392071c6.tar.gz
dexon-solidity-892c3ef8efeb3a79c9e11722651f430f392071c6.tar.zst
dexon-solidity-892c3ef8efeb3a79c9e11722651f430f392071c6.zip
Merge pull request #3111 from ethereum/test-close-failure
Close IPC socket on connect failure
Diffstat (limited to 'test/RPCSession.cpp')
-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
}