Commits

Hector Miuler Malpica Gallegos committed fc8dee4

al terminar la aplicación el sistema ya cierra todos los hilos

Comments (0)

Files changed (1)

src/main/scala/com/miuler/mocksmtp/gui/MainGUI.scala

 
   override def closeEvent(evn: QCloseEvent) {
     log.debug("salir")
-    super.closeEvent(evn)
     if (btnInitSMTP.isChecked()) {
       log.debug("Apagando el servidor")
       mockSMTP.stop
     }
     if (threadConnectionThreadNetty.isAlive) {
-      log.debug("threadConnectionThreadNetty isAlive")
-      //threadConnectionThreadNetty.
+      log.debug("threadConnectionThreadNetty isAlive: {}", threadConnectionThreadNetty.isAlive)
+      connectionTheadNetty.loopConnectionNetty = false
+      connectionTheadNetty.mutex.unlock
       log.debug("threadConnectionThreadNetty isAlive: {}", threadConnectionThreadNetty.isAlive)
     }
   }