@@ -211,20 +211,18 @@ public String update() throws ApplicationException, IOException {
211
211
}
212
212
213
213
public String update (String meetingCode , String sessionId ) throws ApplicationException , IOException {
214
+ String error = "{ \" error\" : \" expired\" }" ;
214
215
if (this .meetings .containsKey (meetingCode )) {
215
216
if (sessions .get (meetingCode ) != null && sessions .get (meetingCode ).contains (sessionId )) {
216
217
return this .update (sessionId );
217
218
}
218
- final HttpServletResponse response = (HttpServletResponse ) this .context .getAttribute ("HTTP_RESPONSE" );
219
- response .setContentType ("application/json" );
220
- response .setStatus (403 );
221
- return "{ \" error\" : \" session-timeout\" }" ;
219
+ error = "{ \" error\" : \" session-timeout\" }" ;
222
220
}
223
-
221
+
224
222
final HttpServletResponse response = (HttpServletResponse ) this .context .getAttribute ("HTTP_RESPONSE" );
225
223
response .setContentType ("application/json" );
226
224
response .setStatus (403 );
227
- return "{ \" error\" : \" expired \" }" ;
225
+ return error ;
228
226
}
229
227
230
228
public String upload () throws ApplicationException {
@@ -329,19 +327,19 @@ public void sessionDestroyed(HttpSessionEvent arg0) {
329
327
builder .put ("time" , format .format (new Date ()));
330
328
builder .put ("cmd" , "expired" );
331
329
this .save (meetingCode , builder );
332
-
330
+
333
331
Queue <Builder > messages ;
334
332
List <String > session_ids ;
335
- synchronized (meetings ) {
333
+ synchronized (this . meetings ) {
336
334
if ((session_ids = this .sessions .get (meetingCode )) != null ) {
337
335
session_ids .remove (arg0 .getSession ().getId ());
338
336
}
339
-
340
- if ((messages = meetings .get (meetingCode )) != null ) {
337
+
338
+ if ((messages = this . meetings .get (meetingCode )) != null ) {
341
339
messages .remove (meetingCode );
342
340
}
343
-
344
- meetings .notifyAll ();
341
+
342
+ this . meetings .notifyAll ();
345
343
}
346
344
347
345
synchronized (this .list ) {
0 commit comments