X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/57b69c40c630d8240cff989b5c35e449486aab8e..e05a6b2176b2111c65ff5464a4b25099f9fdfb12:/process.cpp?ds=inline 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 } }