From fdfb700bb579561f5742a50dd54325902b538c16 Mon Sep 17 00:00:00 2001 From: Yu Shi Date: Fri, 13 Dec 2024 14:48:11 +0000 Subject: [PATCH] fix condition --- src/network/linkers_socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/linkers_socket.cpp b/src/network/linkers_socket.cpp index 5b4b86ce67f8..8de48f3d0ae6 100644 --- a/src/network/linkers_socket.cpp +++ b/src/network/linkers_socket.cpp @@ -157,7 +157,7 @@ void Linkers::ListenThread(int incoming_cnt) { } int* ptr_in_rank = reinterpret_cast(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