X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b02538071ffda15d09efbe85f1459e2c4688f68d..11c89cce51496fc517db7fc3485de5ba2b328217:/examples/s4u/dht-chord/s4u-dht-chord.hpp diff --git a/examples/s4u/dht-chord/s4u-dht-chord.hpp b/examples/s4u/dht-chord/s4u-dht-chord.hpp index 04f0c224e2..a5fff65eb7 100644 --- a/examples/s4u/dht-chord/s4u-dht-chord.hpp +++ b/examples/s4u/dht-chord/s4u-dht-chord.hpp @@ -69,6 +69,8 @@ public: } ~ChordMessage() = default; + + static void destroy(void* message); }; class Node { @@ -159,9 +161,9 @@ public: } now = simgrid::s4u::Engine::getClock(); } - if (data != nullptr) { - delete static_cast(data); - } + if (comm_receive != nullptr) + comm_receive->cancel(); + delete static_cast(data); // leave the ring leave(); }