Changeset 8 for src/main/java


Ignore:
Timestamp:
01/28/20 10:20:01 (5 years ago)
Author:
bart
Message:

Update 28 jan 2020

Location:
src/main/java/geniusweb/runserver
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/geniusweb/runserver/RunNego.java

    r5 r8  
    6060                        response.sendError(HttpServletResponse.SC_BAD_REQUEST,
    6161                                        e.getMessage());
     62                        System.err.println("Run request failed " + reqstring);
     63                        e.printStackTrace(); // helpful for debugging run requests
    6264                        return;
    6365                }
  • src/main/java/geniusweb/runserver/RunningNego.java

    r5 r8  
    8383                        out.print(jackson.writeValueAsString(sessionState));
    8484                        out.close();
    85                 } catch (IOException e) {
     85                } catch (Throwable e) { // also catch outOfMem etc.
    8686                        log.log(Level.SEVERE, "Failed to write log file for " + sessionid,
    8787                                        e);
  • src/main/java/geniusweb/runserver/WebSocketProtToPartyConn.java

    r7 r8  
    4646                implements ProtocolToPartyConn {
    4747        private final static ObjectMapper jackson = new ObjectMapper();
     48        // 20MB seems reasonable limit?
     49        private static final int MAX_MESSAGE_SIZE = 20 * 1024 * 1024;
    4850        private final Reporter log;
    4951
     
    178180        public void onOpen(Session session) {
    179181                log.log(Level.INFO, "Party is being connected: " + session);
     182                session.setMaxTextMessageBufferSize(MAX_MESSAGE_SIZE);
     183                session.setMaxBinaryMessageBufferSize(MAX_MESSAGE_SIZE);
    180184                this.session = session;
    181185        }
Note: See TracChangeset for help on using the changeset viewer.