-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. 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. */
set_state(State::FAILED);
else
set_state(State::CANCELED);
- } else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED) {
- if (surf_action_->get_remains() > 0.0) {
- surf_action_->set_state(resource::Action::State::FAILED);
- set_state(State::TIMEOUT);
- } else {
- set_state(State::DONE);
- }
+ } else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED &&
+ surf_action_->get_remains() > 0.0) {
+ surf_action_->set_state(resource::Action::State::FAILED);
+ set_state(State::TIMEOUT);
} else {
set_state(State::DONE);
}