X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TD2%2Fclient%2FThreadClientoSend.java;h=2475be6d7c80245e5b00eb830d0ff4c778c14e85;hb=03a13b6164d44f0c74e5cd180abecbb8e0dda30a;hp=52db7d5abdcad564bc3dc80635086d265da27794;hpb=92d3f605b46c717c1f8dc7aa30dd25db518b7582;p=TD_SR.git diff --git a/TD2/client/ThreadClientoSend.java b/TD2/client/ThreadClientoSend.java index 52db7d5..2475be6 100644 --- a/TD2/client/ThreadClientoSend.java +++ b/TD2/client/ThreadClientoSend.java @@ -38,9 +38,11 @@ public class ThreadClientoSend implements Runnable { if (line.equals(".")) { end = true; } - Message oMsg = new Message(randName, line, Calendar.getInstance()); - client.sendoMsg(oMsg); - System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg); + if (!line.isEmpty()) { + Message oMsg = new Message(randName, line, Calendar.getInstance()); + client.sendoMsg(oMsg); + System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg); + } } } catch (IOException e) {