Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 's4u/model_list' into 'master'
[simgrid.git] / src / kernel / activity / SleepImpl.cpp
index c08a7ab..2630930 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -48,6 +48,8 @@ void SleepImpl::post()
   } else if (surf_action_->get_state() == resource::Action::State::FINISHED) {
     state_ = State::DONE;
   }
+
+  clean_action();
   /* Answer all simcalls associated with the synchro */
   finish();
 }
@@ -67,8 +69,6 @@ void SleepImpl::finish()
       simcall->issuer_->simcall_answer();
     }
   }
-
-  clean_action();
 }
 } // namespace activity
 } // namespace kernel