Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge with master
[simgrid.git] / src / simix / smx_network.c
index 11eb250..23600af 100644 (file)
@@ -877,6 +877,16 @@ void SIMIX_comm_finish(smx_action_t action)
 
     simcall->issuer->waiting_action = NULL;
     xbt_fifo_remove(simcall->issuer->comms, action);
+    if(action->comm.detached){
+      if(simcall->issuer == action->comm.src_proc){
+        if(action->comm.dst_proc)
+          xbt_fifo_remove(action->comm.dst_proc->comms, action);
+      }
+      if(simcall->issuer == action->comm.dst_proc){
+        if(action->comm.src_proc)
+          xbt_fifo_remove(action->comm.src_proc->comms, action);
+      }
+    }
     SIMIX_simcall_answer(simcall);
     destroy_count++;
   }