message* msg;
m_host_t from;
- if (may_receive() && comm.recv(msg, from, wait)) {
+ while (may_receive() && comm.recv(msg, from, wait)) {
switch (msg->get_type()) {
case message::INFO: {
neighbor* n = rev_neigh[from];
break;
}
delete msg;
+ wait = false; // only wait on first recv
}
}