# HG changeset patch # User oshiro # Date 1548233836 -32400 # Node ID 6e30cb5d905f90b7179cf6f1d2c10124bdba2686 # Parent 06984dedd454241562cc072f443b84c4128cf15e fix timeout diff -r 06984dedd454 -r 6e30cb5d905f .idea/misc.xml --- a/.idea/misc.xml Wed Nov 28 19:07:21 2018 +0900 +++ b/.idea/misc.xml Wed Jan 23 17:57:16 2019 +0900 @@ -1,8 +1,5 @@ - - - - - - - - - - - - - - + - - - - - - - - - - - - 1.8 - - - - - - - - 1.8 (1) - - - - - - - - - - - - - - \ No newline at end of file diff -r 06984dedd454 -r 6e30cb5d905f src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java --- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Nov 28 19:07:21 2018 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Jan 23 17:57:16 2019 +0900 @@ -150,16 +150,25 @@ logger.severe("Unsupported server message. Id = " + messageId); } } catch (TransportException e) { + System.out.println(e.getMessage()); + System.out.println(e.getCause().getClass().getSimpleName()); if (e.getCause().getClass().getSimpleName().equals("SocketTimeoutException")) { - if (rfb.isTreeManager()) { - sendFrameBufferUpdateRequest(); - } try { + if (rfb.isTreeManager()) { + sendFrameBufferUpdateRequest(); + } reader.reset(); } catch (TransportException e1) { e1.printStackTrace(); } continue; + } else if (e.getMessage() == "java.io.EOFException") { + try { + sendFrameBufferUpdateRequest(); + reader.reset(); + } catch (TransportException e1) { + e1.printStackTrace(); + } } logger.severe("Close session : ReceiverTask : " + e.getMessage()); if(!rfb.isTreeManager() && !(rfb.getTerminationType())) { diff -r 06984dedd454 -r 6e30cb5d905f src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java --- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Wed Nov 28 19:07:21 2018 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Wed Jan 23 17:57:16 2019 +0900 @@ -175,7 +175,7 @@ viewerWindow = viewerWindowFactory.createViewerWindow(workingProtocol, rfbSettings, uiSettings, connectionString, presenter); workingProtocol.startNormalHandling(this,viewerWindow.getSurface(), clipboardController, myRfb); try { - workingSocket.setSoTimeout(100); + workingSocket.setSoTimeout(1000); } catch (SocketException e) { e.printStackTrace(); }