X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/57b69c40c630d8240cff989b5c35e449486aab8e..1366ceca8a115df18885fa9ae1f11452630d03bf:/process.cpp?ds=sidebyside diff --git a/process.cpp b/process.cpp index 338f20d..53cbb59 100644 --- a/process.cpp +++ b/process.cpp @@ -234,7 +234,7 @@ void process::receive(bool wait) 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]; @@ -261,6 +261,7 @@ void process::receive(bool wait) break; } delete msg; + wait = false; // only wait on first recv } }