X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ca7162936235b0732afe3a675ca09fe11f915eab..8a7a5f10297e28c98d9c77e2985e96627a43e95e:/src/simix/smx_network.c diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 113b9d6981..a5868d1fdd 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -508,6 +508,7 @@ static XBT_INLINE void SIMIX_comm_start(smx_action_t action) void SIMIX_comm_finish(smx_action_t action) { + unsigned int destroy_count = 0; smx_req_t req; while ((req = xbt_fifo_shift(action->request_list))) { @@ -606,7 +607,11 @@ void SIMIX_comm_finish(smx_action_t action) req->issuer->waiting_action = NULL; SIMIX_request_answer(req); + destroy_count++; } + + while(destroy_count-- > 0) + SIMIX_comm_destroy(action); } void SIMIX_post_comm(smx_action_t action)