mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
release semaphores before stopping simulation (may deadlock)
This commit is contained in:
parent
921ceabb50
commit
382d69ed5d
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: LogScriptEngine.java,v 1.10 2009/04/03 17:05:14 fros4943 Exp $
|
||||
* $Id: LogScriptEngine.java,v 1.11 2009/04/23 10:41:35 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.plugins;
|
||||
@ -338,7 +338,6 @@ public class LogScriptEngine {
|
||||
/*logger.info("test script thread starts");*/
|
||||
try {
|
||||
((Invocable)engine).getInterface(Runnable.class).run();
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
Throwable throwable = e;
|
||||
while (throwable.getCause() != null) {
|
||||
@ -347,7 +346,7 @@ public class LogScriptEngine {
|
||||
|
||||
if (throwable.getMessage() != null &&
|
||||
throwable.getMessage().contains("test script killed") ) {
|
||||
/*logger.info("test script thread terminated by exception");*/
|
||||
logger.info("Test script finished");
|
||||
} else {
|
||||
if (!GUI.isVisualized()) {
|
||||
logger.fatal("Test script error, terminating Cooja.");
|
||||
@ -356,8 +355,8 @@ public class LogScriptEngine {
|
||||
}
|
||||
|
||||
logger.fatal("Script error:", e);
|
||||
gui.getSimulation().stopSimulation();
|
||||
deactivateScript();
|
||||
gui.getSimulation().stopSimulation();
|
||||
}
|
||||
}
|
||||
/*logger.info("test script thread exits");*/
|
||||
|
Loading…
Reference in New Issue
Block a user