Merge "Fix connect() retry loop." into main am: 5aee6aca72
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/3002967 Change-Id: I1bbca08324cf25d1c1d8891024136bedc4892d69 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bfb41dec7b
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ class UncryptTest : public ::testing::Test {
|
||||||
// Connect to the uncrypt socket.
|
// Connect to the uncrypt socket.
|
||||||
bool success = false;
|
bool success = false;
|
||||||
for (int retry = 0; retry < SOCKET_CONNECTION_MAX_RETRY; retry++) {
|
for (int retry = 0; retry < SOCKET_CONNECTION_MAX_RETRY; retry++) {
|
||||||
if (connect(sockfd, reinterpret_cast<sockaddr*>(&un), sizeof(sockaddr_un)) != 0) {
|
if (connect(sockfd, reinterpret_cast<sockaddr*>(&un), sizeof(sockaddr_un)) == 0) {
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue