Client chatListener now throws an IO exception of the chatMSg from the server is null.
This commit is contained in:
parent
968cb94f21
commit
4557b4801b
@ -89,10 +89,10 @@ public class Client {
|
|||||||
chatMsg = in.readLine(); //todo: maybe if
|
chatMsg = in.readLine(); //todo: maybe if
|
||||||
if (chatMsg != null) {
|
if (chatMsg != null) {
|
||||||
parse(chatMsg);
|
parse(chatMsg);
|
||||||
} else { System.out.println("chatMsg is null");}
|
} else { System.out.println("chatMsg is null"); throw new IOException();}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
LOGGER.debug("Exception while trying to read message");
|
LOGGER.debug("Exception while trying to read message: " + e.getMessage());
|
||||||
disconnectFromServer();
|
disconnectFromServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user