Fix run without distributed

This commit is contained in:
Angelos Katharopoulos 2024-09-06 11:02:29 -07:00
parent 29ec3539ed
commit 44f0de2854

View File

@ -168,7 +168,7 @@ struct GroupImpl {
int success;
// If we are expecting anyone to connect to us
if (rank_ < peers.size() - 1) {
if (rank_ + 1 < peers.size()) {
// Create the socket to wait for connections from the peers
int sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) {