public class ThreadClientoSend implements Runnable {
private SocketClient client;
- //FIXME: use a random name by thread for now
- // should be setable
+ //FIXME: use a random name by thread for now, should be setable
private String randName;
ThreadClientoSend(SocketClient c) {
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.length() != 0) {
+ Message oMsg = new Message(randName, line, Calendar.getInstance());
+ client.sendoMsg(oMsg);
+ System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg);
+ }
}
}
catch (IOException e) {