Mercurial > hg > Applications > TreeVNC
changeset 481:6e30cb5d905f
fix timeout
author | oshiro |
---|---|
date | Wed, 23 Jan 2019 17:57:16 +0900 |
parents | 06984dedd454 |
children | 73b52954efc9 |
files | .idea/misc.xml src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java |
diffstat | 3 files changed, 14 insertions(+), 68 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> - <component name="EntryPointsManager"> - <entry_points version="2.0" /> - </component> <component name="MavenImportPreferences"> <option name="generalSettings"> <MavenGeneralSettings> @@ -10,67 +7,7 @@ </MavenGeneralSettings> </option> </component> - <component name="ProjectLevelVcsManager" settingsEditedManually="false"> - <OptionsSetting value="true" id="Add" /> - <OptionsSetting value="true" id="Remove" /> - <OptionsSetting value="true" id="Checkout" /> - <OptionsSetting value="true" id="Update" /> - <OptionsSetting value="true" id="Status" /> - <OptionsSetting value="true" id="Edit" /> - <ConfirmationsSetting value="0" id="Add" /> - <ConfirmationsSetting value="0" id="Remove" /> - </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> - <component name="masterDetails"> - <states> - <state key="GlobalLibrariesConfigurable.UI"> - <settings> - <splitter-proportions> - <option name="proportions"> - <list> - <option value="0.2" /> - </list> - </option> - </splitter-proportions> - </settings> - </state> - <state key="JdkListConfigurable.UI"> - <settings> - <last-edited>1.8</last-edited> - <splitter-proportions> - <option name="proportions"> - <list> - <option value="0.2" /> - </list> - </option> - </splitter-proportions> - </settings> - </state> - <state key="ProjectJDKs.UI"> - <settings> - <last-edited>1.8 (1)</last-edited> - <splitter-proportions> - <option name="proportions"> - <list> - <option value="0.2" /> - </list> - </option> - </splitter-proportions> - </settings> - </state> - <state key="ProjectLibrariesConfigurable.UI"> - <settings> - <splitter-proportions> - <option name="proportions"> - <list> - <option value="0.2" /> - </list> - </option> - </splitter-proportions> - </settings> - </state> - </states> - </component> </project> \ No newline at end of file
--- 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())) {
--- 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(); }