TD2: Check for message text emptyness.
[TD_SR.git] / TD2 / client / ThreadClientSend.java
index 399cfd3139f819247e3a301fe9c88a52b0ed9724..2ba2491e48a49f2e46d42ab7a1a6431d6a652be7 100644 (file)
@@ -17,8 +17,10 @@ public class ThreadClientSend 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 (IOException e) {