Skip to content

Commit

Permalink
less restrictive DoS handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Nov 12, 2017
1 parent bfe9633 commit fea3d05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/config.properties
Expand Up @@ -110,7 +110,7 @@ upgradeInterval = 86400000

# settings to prevent DoS
DoS.blackout = 100
DoS.servicereduction = 1000
DoS.servicereduction = 500

# peer-to-peer back-end: this is used to assign a 'shadow' peer which
# receives all message data that this peer creates
Expand Down
2 changes: 2 additions & 0 deletions src/org/loklak/LoklakServer.java
Expand Up @@ -419,6 +419,7 @@ private static void initializeHarvester() {
private static void setupHttpServer(int httpPort, int httpsPort) throws Exception{
QueuedThreadPool pool = new QueuedThreadPool();
pool.setMaxThreads(500);
pool.start();
LoklakServer.server = new Server(pool);
LoklakServer.server.setStopAtShutdown(true);

Expand All @@ -436,6 +437,7 @@ private static void setupHttpServer(int httpPort, int httpsPort) throws Exceptio
connector.setPort(httpPort);
connector.setName("httpd:" + httpPort);
connector.setIdleTimeout(20000); // timout in ms when no bytes send / received
connector.start();
LoklakServer.server.addConnector(connector);
}

Expand Down

0 comments on commit fea3d05

Please sign in to comment.