Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the issuer of a remote exec that fails should not die
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 23 Aug 2021 22:01:21 +0000 (00:01 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 23 Aug 2021 22:43:43 +0000 (00:43 +0200)
src/kernel/activity/ExecImpl.cpp

index ce5252c..617cc86 100644 (file)
@@ -184,10 +184,10 @@ void ExecImpl::finish()
     }
     switch (state_) {
       case State::FAILED:
-        simcall->issuer_->context_->set_wannadie();
         if (simcall->issuer_->get_host()->is_on())
           simcall->issuer_->exception_ = std::make_exception_ptr(HostFailureException(XBT_THROW_POINT, "Host failed"));
-        /* else, the actor will be killed with no possibility to survive */
+        else /* else, the actor will be killed with no possibility to survive */
+          simcall->issuer_->context_->set_wannadie();
         break;
 
       case State::CANCELED: