X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TD2%2Fclient%2FThreadClientSend.java;h=639228fe45f6eef313a2abd9998b92ca721c9b9d;hb=73a5e231a2e60b6a4e141b89ff56208dcf225b0b;hp=33a8461966597c496f7d718c7bd1ae282cbbdb6c;hpb=fcb90b7628735985651da7d75ae0e98ac67a2f67;p=TD_SR.git diff --git a/TD2/client/ThreadClientSend.java b/TD2/client/ThreadClientSend.java index 33a8461..639228f 100644 --- a/TD2/client/ThreadClientSend.java +++ b/TD2/client/ThreadClientSend.java @@ -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.length() != 0) { + client.sendMsg(line); + System.out.println(Thread.currentThread().getName() + " a envoye " + line); + } } } catch (IOException e) { @@ -32,6 +34,7 @@ public class ThreadClientSend implements Runnable { } catch (IOException e) { System.err.println("IOException: " + e); + e.printStackTrace(); } } }