mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-561: Throw timeout exception when socket times out.
This commit is contained in:
		| @@ -36,8 +36,10 @@ import java.io.InputStreamReader; | ||||
| import java.io.OutputStreamWriter; | ||||
| import java.net.InetSocketAddress; | ||||
| import java.net.SocketAddress; | ||||
| import java.net.SocketTimeoutException; | ||||
| import org.glyptodon.guacamole.GuacamoleException; | ||||
| import org.glyptodon.guacamole.GuacamoleServerException; | ||||
| import org.glyptodon.guacamole.GuacamoleUpstreamTimeoutException; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
|  | ||||
| @@ -110,6 +112,9 @@ public class InetGuacamoleSocket implements GuacamoleSocket { | ||||
|             writer = new WriterGuacamoleWriter(new OutputStreamWriter(sock.getOutputStream(), "UTF-8")); | ||||
|  | ||||
|         } | ||||
|         catch (SocketTimeoutException e) { | ||||
|             throw new GuacamoleUpstreamTimeoutException("Connection timed out.", e); | ||||
|         } | ||||
|         catch (IOException e) { | ||||
|             throw new GuacamoleServerException(e); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user