Fix ZMQ bind error on non-zero rank nodes when using SGLANG_BLOCK_NONZERO_RANK_CHILDREN=0 (#13686)

This commit is contained in:
ishandhanani
2025-11-20 22:54:41 -08:00
committed by GitHub
parent eda2f70033
commit b537ac0d1f

View File

@@ -136,9 +136,12 @@ class Engine(EngineBase):
# Initialize ZMQ sockets
context = zmq.Context(2)
self.send_to_rpc = get_zmq_socket(
context, zmq.DEALER, self.port_args.rpc_ipc_name, True
)
if self.server_args.node_rank == 0:
self.send_to_rpc = get_zmq_socket(
context, zmq.DEALER, self.port_args.rpc_ipc_name, True
)
else:
self.send_to_rpc = None
# Enable tracing
if server_args.enable_trace: