Mercurial > hg > Applications > TreeVNC
changeset 603:1ea1ad54224b
remove debug message and failure flag
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 17 Feb 2020 17:11:55 +0900 |
parents | 57b36ded763d |
children | 668ff8c17f46 |
files | src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Feb 17 13:56:51 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Feb 17 17:11:55 2020 +0900 @@ -119,6 +119,7 @@ @Override public void run() { + int failure = 0; isRunning = true; if (fullscreenFbUpdateIncrementalRequest != null) { fullscreenFbUpdateIncrementalRequest.sendFullScreenRequest(context); @@ -154,11 +155,13 @@ logger.fine("Unsupported server message. Id = " + messageId); continue; } + failure = 0; } catch (TransportException e) { System.out.println(e.getMessage()); System.out.println(e.getCause().getClass().getSimpleName()); if (e.getCause().getClass().getSimpleName().equals("SocketTimeoutException")) { sendFrameBufferUpdateRequest(); + if (failure++ > 10) stopTask(); continue; } logger.severe("Close session : ReceiverTask : " + e.getMessage()); @@ -268,7 +271,7 @@ logger.finest(rect.toString() + (0 == numberOfRectangles ? "\n---" : "")); if (decoder != null) { try { - System.out.println(rect); + // System.out.println(rect); decoder.decode(reader, renderer, rect); // TreeVNC processing here if (rfb.getCuiVersion()) continue; repaintController.repaintBitmap(rect); @@ -298,7 +301,7 @@ screen.port = (int) id; screen.time = flag; screens.add(screen); - System.out.println("screen " + id + ":" + "x=" + x + " y=" + y + "width=" + width + "height=" + height); + // System.out.println("screen " + id + ":" + "x=" + x + " y=" + y + "width=" + width + "height=" + height); } return; } else if (rect.getEncodingType() == EncodingType.DESKTOP_SIZE) {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Mon Feb 17 13:56:51 2020 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Mon Feb 17 17:11:55 2020 +0900 @@ -81,7 +81,7 @@ private boolean stopBroadcast; // multicastBlocking is an internal test flag // perform blocking on TCP connection - public boolean multicastBlocking = true; + public boolean multicastBlocking = false; public TreeRFBProto(boolean isTreeManager, ViewerInterface viewer) { nets.setMyRfb(this); @@ -311,10 +311,8 @@ writerRunning.set(1); try { // requestThreadNotify(); // send full screen request via fullScreenRequestThread - // after this, we discard upward packet. new Thread(reader, "upward-packet-processing").start(); - for (; ; ) { LinkedList<ByteBuffer> bufs = c.poll(); int inputIndex = 0; @@ -350,7 +348,7 @@ while (inputIndex < bufs.size()) { ByteBuffer b = bufs.get(inputIndex++); os.write(b.array(), b.position(), b.limit()); - messageDump(b.array(),b.limit()-b.position(),24, "write to client: "); + // messageDump(b.array(),b.limit()-b.position(),24, "write to client: "); } os.flush(); multicastqueue.heapAvailable();