Changeset 4 for src/main/java/geniusweb/runserver/PartyConnection.java
- Timestamp:
- 09/24/19 14:13:26 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/geniusweb/runserver/PartyConnection.java
r1 r4 33 33 34 34 /** 35 * A websocket based {@link ConnectionWithParty}. Must be public so that it can 36 * be accessed as ClientEndpoint by apache tomcat 35 * A websocket based {@link ConnectionWithParty}. it contains a websocket 36 * connection to a party that runs on a runserver. Must be public so that it can 37 * be accessed as ClientEndpoint by apache tomcat. This is internally used. 37 38 */ 38 39 @ClientEndpoint … … 102 103 .openConnection(); 103 104 // if this throws, the IOException seems to contain the "retry later" 104 // message 105 // already 106 conn.setRequestMethod("GET"); // TODO timeout 105 // message already 106 conn.setRequestMethod("GET"); 107 conn.setReadTimeout(20000); 108 conn.connect(); 107 109 BufferedReader rd; 108 110 try { … … 110 112 new InputStreamReader(conn.getInputStream())); 111 113 } catch (IOException e) { 114 if (conn.getErrorStream() == null) { 115 throw new IOException("Failed to connect " + reference 116 + ", no server error message", e); 117 } 112 118 // read the detail message from the error stream 113 119 rd = new BufferedReader(
Note:
See TracChangeset
for help on using the changeset viewer.