Do not generate SIGPIPE errors in SocketCLient.
This change is to make sure the users of library does not crash if they are not handling SIGPIPE properly. Change-Id: I4ea80d6bfc26a4bca6b901959ae3060b059d46d3
This commit is contained in:
parent
63d84d049a
commit
6ac770fc52
|
@ -140,7 +140,7 @@ int SocketClient::sendDataLocked(const void *data, int len) {
|
|||
}
|
||||
|
||||
while (brtw > 0) {
|
||||
rc = write(mSocket, p, brtw);
|
||||
rc = send(mSocket, p, brtw, MSG_NOSIGNAL);
|
||||
if (rc > 0) {
|
||||
p += rc;
|
||||
brtw -= rc;
|
||||
|
|
Loading…
Reference in New Issue