Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #113 from adfaure/master
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 7 Sep 2016 18:58:04 +0000 (20:58 +0200)
committerGitHub <noreply@github.com>
Wed, 7 Sep 2016 18:58:04 +0000 (20:58 +0200)
[s4u]fix s4u::Comm::wait_any_for bugs when the timeout is below the c…

src/simix/smx_network.cpp

index e25d531..0edf57d 100644 (file)
@@ -497,7 +497,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros, d
   if (timeout < 0.0){
     simcall->timer = NULL;
   } else {
-    simcall->timer = SIMIX_timer_set(timeout, [simcall]() {
+    simcall->timer = SIMIX_timer_set(SIMIX_get_clock() + timeout, [simcall]() {
       SIMIX_waitany_remove_simcall_from_actions(simcall);
       simcall_comm_waitany__set__result(simcall, -1);
       SIMIX_simcall_answer(simcall);