Skip to content

Commit 630b8e6

Browse files
author
mchist
committed
while was added in Controller
1 parent 4d81d18 commit 630b8e6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Lesson_6/Client/Controller.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ public void initialize(URL location, ResourceBundle resourceBundle) {
4444
in = new DataInputStream(socket.getInputStream());
4545
out = new DataOutputStream(socket.getOutputStream());
4646

47+
4748
new Thread(new Runnable() {
4849
@Override
4950
public void run() {
5051
while (true) {
5152
try {
52-
String str = in.readUTF();
53-
textArea.appendText(str + "\n");
53+
while (true) {
54+
String str = in.readUTF();
55+
textArea.appendText(str + "\n");
56+
}
5457
}
5558
catch (IOException exc) {
5659
exc.printStackTrace();

0 commit comments

Comments
 (0)