X-Git-Url: https://git.piment-noir.org/?p=TD_SR.git;a=blobdiff_plain;f=TD2%2Fclient%2FThreadClientSend.java;h=42fe7dfd13c723a5cac6c8e09bbfe4cbf7db611c;hp=9d40e0d6a7effddb01cd3e585fc7a1db0caabd33;hb=6b300998692af2dca53cf1fe97305d27b56430b0;hpb=da31e6daf7553c6b38ca83c428dd02a3aa8af853 diff --git a/TD2/client/ThreadClientSend.java b/TD2/client/ThreadClientSend.java index 9d40e0d..42fe7df 100644 --- a/TD2/client/ThreadClientSend.java +++ b/TD2/client/ThreadClientSend.java @@ -14,26 +14,26 @@ public class ThreadClientSend implements Runnable { boolean end = false; while (!end) { String line = userInput.readLine(); - if (line.equals(".")) { + if (line.equals(".")) { end = true; } client.sendMsg(line); System.out.println(Thread.currentThread().getName() + " a envoye " + line); } - } + } catch (IOException e) { System.err.println("IOException: " + e); e.printStackTrace(); } finally { if (userInput != null) { - try { - userInput.close(); - } - catch (IOException e) { - System.err.println("IOException: " + e); - } - } + try { + userInput.close(); + } + catch (IOException e) { + System.err.println("IOException: " + e); + } + } } } }