Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions orte/mca/oob/tcp/oob_tcp_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,11 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd,
if (opal_socket_errno != EINTR &&
opal_socket_errno != EAGAIN &&
opal_socket_errno != EWOULDBLOCK) {
if (peer->state == MCA_OOB_TCP_CONNECT_ACK) {
if (NULL == peer) {
/* protect against things like port scanners */
CLOSE_THE_SOCKET(sd);
return false;
} else if (peer->state == MCA_OOB_TCP_CONNECT_ACK) {
/* If we overflow the listen backlog, it's
possible that even though we finished the three
way handshake, the remote host was unable to
Expand Down Expand Up @@ -1038,12 +1042,8 @@ static bool tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, int sd,
(NULL == peer) ? "UNKNOWN" : ORTE_NAME_PRINT(&(peer->name)),
strerror(opal_socket_errno),
opal_socket_errno);
if (NULL != peer) {
peer->state = MCA_OOB_TCP_FAILED;
mca_oob_tcp_peer_close(peer);
} else {
CLOSE_THE_SOCKET(sd);
}
peer->state = MCA_OOB_TCP_FAILED;
mca_oob_tcp_peer_close(peer);
return false;
}
}
Expand Down