mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Detect closed sockets in IPC
This commit is contained in:
parent
5396c7692b
commit
f9a818eaf8
@ -114,7 +114,8 @@ string IPCSocket::sendRequest(string const& _req)
|
||||
|
||||
ssize_t ret = recv(m_socket, m_readBuf, sizeof(m_readBuf), 0);
|
||||
|
||||
if (ret < 0)
|
||||
// Also consider closed socket an error.
|
||||
if (ret <= 0)
|
||||
BOOST_FAIL("Reading on IPC failed");
|
||||
|
||||
return string(m_readBuf, m_readBuf + ret);
|
||||
|
Loading…
Reference in New Issue
Block a user