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