From 60acf7de9817cfd690cd5f1cf6a042d63bfa9c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Wed, 16 Mar 2016 18:48:09 +0100 Subject: [PATCH] fix SerialSocketServer when run without GUI --- .../org/contikios/cooja/serialsocket/SerialSocketServer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cooja/apps/serial_socket/java/org/contikios/cooja/serialsocket/SerialSocketServer.java b/tools/cooja/apps/serial_socket/java/org/contikios/cooja/serialsocket/SerialSocketServer.java index fa55da74b..e73eac513 100644 --- a/tools/cooja/apps/serial_socket/java/org/contikios/cooja/serialsocket/SerialSocketServer.java +++ b/tools/cooja/apps/serial_socket/java/org/contikios/cooja/serialsocket/SerialSocketServer.java @@ -644,6 +644,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin { private Timer updateTimer = new Timer(UPDATE_INTERVAL, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { + if (Cooja.isVisualized()) { if (closed) { updateTimer.stop(); return; @@ -652,6 +653,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin { socketToMoteLabel.setText(inBytes + " bytes"); moteToSocketLabel.setText(outBytes + " bytes"); } + } }); }