Add max-sessions setting to configuration.txt - limits concurrent threads and sessions on internal web server
This commit is contained in:
parent
42132328cd
commit
aa29ddf141
4 changed files with 37 additions and 4 deletions
|
|
@ -275,11 +275,13 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
int port = configuration.getInteger("webserver-port", 8123);
|
||||
boolean allow_symlinks = configuration.getBoolean("allow-symlinks", false);
|
||||
boolean checkbannedips = configuration.getBoolean("check-banned-ips", true);
|
||||
int maxconnections = configuration.getInteger("max-sessions", 30);
|
||||
if(maxconnections < 2) maxconnections = 2;
|
||||
if(allow_symlinks)
|
||||
Log.verboseinfo("Web server is permitting symbolic links");
|
||||
else
|
||||
Log.verboseinfo("Web server is not permitting symbolic links");
|
||||
webServer = new HttpServer(bindAddress, port, checkbannedips);
|
||||
webServer = new HttpServer(bindAddress, port, checkbannedips, maxconnections);
|
||||
webServer.handlers.put("/", new FilesystemHandler(getFile(configuration.getString("webpath", "web")), allow_symlinks));
|
||||
webServer.handlers.put("/tiles/", new FilesystemHandler(tilesDirectory, allow_symlinks));
|
||||
webServer.handlers.put("/up/configuration", new ClientConfigurationHandler(this));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue