added gracefull shutdown
[des2015.git] / dsl / runtime / src / nl / ru / des / sensors / BTController.java
index 062fa61..37214a5 100644 (file)
@@ -67,8 +67,9 @@ public class BTController{
                                                try {
                                                        dataOut.write(buf.poll().getBytes());
                                                        dataOut.flush();
-                                               } catch (IOException e) {
+                                               } catch (Exception e) {
                                                        e.printStackTrace();
+                                                       System.exit(0);
                                                }
                                        }
                                        Thread.yield();