Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 523:dca83cc39438
fix
author | mir3636 |
---|---|
date | Sun, 24 Feb 2019 16:47:30 +0900 |
parents | 6677ce2c7017 |
children | ef2f70aee45a |
files | src/main/java/jp/ac/u_ryukyu/treevnc/BroadcastRFBListener.java |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/BroadcastRFBListener.java Fri Feb 22 19:53:15 2019 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/BroadcastRFBListener.java Sun Feb 24 16:47:30 2019 +0900 @@ -57,17 +57,15 @@ * It contains a port to receive, so multiple TREEVNC clients can run on a PC. */ private void rfbBroadcastLoop() { - byte[] buf = new byte[BufSize]; - - DatagramPacket recvPacket = new DatagramPacket(buf, BufSize); while (!stopFlag) { try { - soc.receive(recvPacket); + byte[] buf = new byte[BufSize]; + DatagramPacket recvPacket = new DatagramPacket(buf, BufSize); soc.receive(recvPacket); String hostname = recvPacket.getAddress().getHostAddress(); byte[] reply = recvPacket.getData(); int len = recvPacket.getLength(); boolean isTreeRoot = rfb.isTreeManager(); - if (isTreeRoot && receiverTask != null) { + if (receiverTask != null) { receiverTask.setReader(new Reader(new ByteArrayInputStream(reply))); if (receiverTask.getMessageId() == FRAMEBUFFER_UPDATE) { receiverTask.framebufferUpdateMessage();