Merge "Report the right error code from PropertyServiceConnection()"
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp
index 2a42390..e5947c8 100644
--- a/libc/bionic/system_properties.cpp
+++ b/libc/bionic/system_properties.cpp
@@ -501,9 +501,9 @@
socklen_t alen = namelen + offsetof(sockaddr_un, sun_path) + 1;
if (TEMP_FAILURE_RETRY(connect(socket_, reinterpret_cast<sockaddr*>(&addr), alen)) == -1) {
+ last_error_ = errno;
close(socket_);
socket_ = -1;
- last_error_ = errno;
}
}