am 496fc30d: am af2cd21d: Merge "When new error happend,then errno should be updated accordingly. Otherwise, need to keep previous errno."

* commit '496fc30d9988ff8de8eefc575cb8c8335ec8cf8e':
  When new error happend,then errno should be updated accordingly. Otherwise, need to keep previous errno.
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp
index d3ce8f5..4ab06b4 100644
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -220,7 +220,8 @@
 
     sigaction(SIGPIPE, &old_action, &new_action);
 
-    errno = e;
+    if ( e != 0 )
+        errno = e;
     return ret;
 }