mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Close IPC socket on connect failure
This commit is contained in:
parent
7454a766b3
commit
362615c9c4
@ -74,7 +74,10 @@ IPCSocket::IPCSocket(string const& _path): m_path(_path)
|
|||||||
BOOST_FAIL("Error creating IPC socket object");
|
BOOST_FAIL("Error creating IPC socket object");
|
||||||
|
|
||||||
if (connect(m_socket, reinterpret_cast<struct sockaddr const*>(&saun), sizeof(struct sockaddr_un)) < 0)
|
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);
|
BOOST_FAIL("Error connecting to IPC socket: " << _path);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user