summaryrefslogtreecommitdiff
path: root/libsysutils/src/SocketClient.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-11-10 23:45:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-10 23:45:50 +0000
commitaf2cd21d00f16f4915a40004bdbdc2603e958f5a (patch)
treec2650b22f4d2d3f9a9ae7897ae67fe66b02af2ef /libsysutils/src/SocketClient.cpp
parentae52248fa7ab12e1c3458aede101f143b1c76ead (diff)
parent4df4dfedf6beef891d05d4e80704f5f4a594a885 (diff)
Merge "When new error happend,then errno should be updated accordingly. Otherwise, need to keep previous errno."
Diffstat (limited to 'libsysutils/src/SocketClient.cpp')
-rw-r--r--libsysutils/src/SocketClient.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp
index d3ce8f5a8..4ab06b4af 100644
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -220,7 +220,8 @@ int SocketClient::sendDataLockedv(struct iovec *iov, int iovcnt) {
sigaction(SIGPIPE, &old_action, &new_action);
- errno = e;
+ if ( e != 0 )
+ errno = e;
return ret;
}