Revision 9137
Added by Jing Tao over 9 years ago
src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java | ||
---|---|---|
229 | 229 |
HttpURLConnection connection = (HttpURLConnection) u.openConnection(); |
230 | 230 |
connection.setDoOutput(true); |
231 | 231 |
connection.setRequestMethod("GET"); |
232 |
connection.setReadTimeout(5000); |
|
233 |
//System.out.println("the ============== the read timeout is ================"+connection.getReadTimeout()); |
|
234 |
//System.out.println("the ============== the connection timeout is ================"+connection.getConnectTimeout()); |
|
232 | 235 |
connection.connect(); |
233 | 236 |
String schema = IOUtils.toString(connection.getInputStream()); |
234 | 237 |
|
Also available in: Unified diff
Add a read timeout for the connection. See bug https://projects.ecoinformatics.org/ecoinfo/issues/6684:wq