Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Do not cause a SIGPIPE on Unix socket read
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jan 29, 2019
1 parent 7bb0688 commit aa005cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libweb3jsonrpc/UnixSocketServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ size_t UnixDomainSocketServer::Write(int _connection, string const& _data)

size_t UnixDomainSocketServer::Read(int _connection, void* _data, size_t _size)
{
ssize_t r = read(_connection, _data, _size);
ssize_t r = recv(_connection, _data, _size, MSG_NOSIGNAL);
if (r < 0)
return 0;
return static_cast<size_t>(r);
Expand Down

0 comments on commit aa005cb

Please sign in to comment.