Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1994 committed Dec 13, 2024
1 parent 916c887 commit fdfb700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/linkers_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void Linkers::ListenThread(int incoming_cnt) {
}
int* ptr_in_rank = reinterpret_cast<int*>(buffer);
int in_rank = *ptr_in_rank;
if (in_rank < 0 && in_rank >= num_machines_) {
if (in_rank < 0 || in_rank >= num_machines_) {
Log::Fatal("Invalid rank %d found during initialization of linkers. The world size is %d", in_rank, num_machines_);
}
// add new socket
Expand Down

0 comments on commit fdfb700

Please sign in to comment.