From: Arnaud Giersch Date: Fri, 22 Feb 2019 10:02:35 +0000 (+0100) Subject: Handle CancelException in MSG_{comm,test} too. X-Git-Tag: v3_22~270^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b97c430c13a02ce080d7ce910004567c31d0aee1?ds=sidebyside Handle CancelException in MSG_{comm,test} too. --- diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index 7a80ef3539..883360fe77 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -458,6 +458,9 @@ int MSG_comm_test(msg_comm_t comm) } catch (simgrid::TimeoutError& e) { comm->status = MSG_TIMEOUT; finished = true; + } catch (simgrid::CancelException& e) { + comm->status = MSG_HOST_FAILURE; + finished = true; } catch (xbt_ex& e) { if (e.category == network_error) { @@ -497,6 +500,9 @@ int MSG_comm_testany(xbt_dynar_t comms) } catch (simgrid::TimeoutError& e) { finished_index = e.value; status = MSG_TIMEOUT; + } catch (simgrid::CancelException& e) { + finished_index = e.value; + status = MSG_HOST_FAILURE; } catch (xbt_ex& e) { if (e.category != network_error) @@ -546,6 +552,8 @@ msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout) /* FIXME: these functions are not traceable */ } catch (simgrid::TimeoutError& e) { comm->status = MSG_TIMEOUT; + } catch (simgrid::CancelException& e) { + comm->status = MSG_HOST_FAILURE; } catch (xbt_ex& e) { if (e.category == network_error) @@ -593,6 +601,9 @@ int MSG_comm_waitany(xbt_dynar_t comms) } catch (simgrid::TimeoutError& e) { finished_index = e.value; status = MSG_TIMEOUT; + } catch (simgrid::CancelException& e) { + finished_index = e.value; + status = MSG_HOST_FAILURE; } catch(xbt_ex& e) { if (e.category == network_error) {