Mercurial > hg > Applications > TreeVNC
diff src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java @ 133:70cbec526039
connection handling
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Jun 2014 12:54:44 +0900 |
parents | 32c6563492f3 |
children | ada4d850a820 |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Jun 07 01:57:58 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Jun 07 12:54:44 2014 +0900 @@ -41,6 +41,7 @@ import com.glavsoft.rfb.encoding.decoder.ZRLEESender; import com.glavsoft.transport.Reader; +import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.util.logging.Logger; @@ -147,7 +148,7 @@ logger.severe("Unsupported server message. Id = " + messageId); } } catch (TransportException e) { - logger.severe("Close session: " + e.getMessage()); + logger.severe("Close session: " + e.getMessage()); if(!rfb.isRoot() && !(rfb.getTerminationType())) { System.out.println("task stop"); int counter = 0; // static int ? @@ -158,7 +159,11 @@ if(counter > 3) { echo.notfoundParent(); } - if(echo.lostHost()) break; + try { + if(echo.lostHost()) break; + } catch (Exception e1) { + logger.severe("Cannot send lostHost: " + e1.getMessage()); + } counter++; } } else if (isRunning) {