From 76a1aca27f2d297e488b055f400847f91b8f8559 Mon Sep 17 00:00:00 2001 From: henricasanova Date: Tue, 4 Jul 2017 11:15:58 +0200 Subject: [PATCH 1/1] Replaced: if (state_ == finished) xbt_die("Don't call test on a finished comm."); by: if (state_ == finished) return true; Since testing a finished comm should be a feature, not a bug --- src/s4u/s4u_comm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/s4u/s4u_comm.cpp b/src/s4u/s4u_comm.cpp index 7729d3e6f9..17a66b6ded 100644 --- a/src/s4u/s4u_comm.cpp +++ b/src/s4u/s4u_comm.cpp @@ -179,8 +179,9 @@ void Comm::cancel() bool Comm::test() { xbt_assert(state_ == inited || state_ == started || state_ == finished); - if (state_ == finished) - xbt_die("Don't call test on a finished comm."); + if (state_ == finished) { + return true; + } if (state_ == inited) { this->start(); -- 2.20.1