Changeset 4 for src/main/java
- Timestamp:
- 09/24/19 14:13:26 (5 years ago)
- Location:
- src/main/java/geniusweb/runserver
- Files:
-
- 2 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( -
src/main/java/geniusweb/runserver/RunNego.java
r1 r4 66 66 RunningNegotiationsRepo.instance(), log); 67 67 RunningNegotiationsRepo.instance().put(session); 68 // set content type to prevent some browsers 69 // trying to parse this (eg as XML) 70 response.setContentType("application/json"); 68 71 response.getWriter().append(session.getID()); 69 72 }
Note:
See TracChangeset
for help on using the changeset viewer.