equal
deleted
inserted
replaced
169 { |
169 { |
170 Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(server, port)); |
170 Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(server, port)); |
171 URL destURL = new URL(urlString); |
171 URL destURL = new URL(urlString); |
172 HttpURLConnection conn = (HttpURLConnection) destURL.openConnection(proxy); |
172 HttpURLConnection conn = (HttpURLConnection) destURL.openConnection(proxy); |
173 conn.setConnectTimeout(connectTimeout); |
173 conn.setConnectTimeout(connectTimeout); |
174 Object value = getOption(SocketOptions.SO_TIMEOUT); |
174 int timeout = (int) getOption(SocketOptions.SO_TIMEOUT); |
175 if (value != null) { |
175 if (timeout > 0) { |
176 Integer timeout = (Integer) value; |
|
177 conn.setReadTimeout(timeout); |
176 conn.setReadTimeout(timeout); |
178 } |
177 } |
179 conn.connect(); |
178 conn.connect(); |
180 doTunneling(conn); |
179 doTunneling(conn); |
181 try { |
180 try { |