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

Commit d49f9fb

Browse files
committed
do not try to read from closed socket
1 parent 3c02c30 commit d49f9fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arbiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int MtmReadSocket(int sd, void* buf, int buf_size)
262262
{
263263
int rc;
264264
while ((rc = pg_recv(sd, buf, buf_size, 0, MtmUseRDMA)) < 0 && errno == EINTR);
265-
if (rc <= 0 && (errno == EAGAIN || errno == EINPROGRESS)) {
265+
if (rc < 0 && (errno == EAGAIN || errno == EINPROGRESS)) {
266266
rc = MtmWaitSocket(sd, false, MtmHeartbeatSendTimeout);
267267
if (rc == 1) {
268268
while ((rc = pg_recv(sd, buf, buf_size, 0, MtmUseRDMA)) < 0 && errno == EINTR);

0 commit comments

Comments
 (0)