TD2: Check for message text emptyness.
[TD_SR.git] / TD2 / IHM / ThreadIHMSend.java
index 2b1a64aba6b80590f8505ed4dff8e70f8f764474..5113989da7208d3ba9e9ee222bb3094239a993cf 100644 (file)
@@ -17,8 +17,10 @@ public class ThreadIHMSend implements Runnable {
                 if (line.equals(".")) {
                     end = true;
                 }
-                client.sendMsg(line);
-                System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+                if (!line.isEmpty()) {
+                    client.sendMsg(line);
+                    System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+                }
             }
         }
         catch (Exception e) {