Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d63aa27

Browse files
committed
fix pg_set_noblock usage
1 parent bce9fa4 commit d63aa27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arbiter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int MtmConnectSocket(int node, int port)
468468
MTM_ELOG(LOG, "Arbiter failed to create socket: %s", strerror(errno));
469469
goto Error;
470470
}
471-
if (pg_set_noblock(sd, MtmUseRDMA)) {
471+
if (!pg_set_noblock(sd, MtmUseRDMA)) {
472472
MTM_ELOG(LOG, "Arbiter failed to switch socket to non-blocking mode: %s", strerror(errno));
473473
goto Error;
474474
}
@@ -637,7 +637,7 @@ static void MtmAcceptOneConnection()
637637
MtmHandshakeMessage req;
638638
MtmArbiterMessage resp;
639639
int rc;
640-
if (pg_set_noblock(fd,MtmUseRDMA)) {
640+
if (!pg_set_noblock(fd,MtmUseRDMA)) {
641641
MTM_ELOG(ERROR, "Arbiter failed to switch socket to non-blocking mode: %s", strerror(errno));
642642
}
643643
rc = MtmReadSocket(fd, &req, sizeof req);

0 commit comments

Comments
 (0)