From d640072b4d8f16ca1d31f178e86fcc98dbddf2d6 Mon Sep 17 00:00:00 2001 From: Amos Ng Date: Sun, 14 Jun 2020 04:40:23 +0800 Subject: [PATCH] Added additional entry to server ping for network speed --- CHANGELOG.md | 1 + src/main/java/mdnet/base/ServerHandler.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10407d5..cb0ffa5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [2020-06-13] Added X-Cache header to image responses by [@lflare]. - [2020-06-13] Added .gitattributes to help sort out CHANGELOG.md merge conflicts by [@lflare]. - [2020-06-13] Added rudimentary web-ui by [@carbotaniuman & @RedMatriz]. +- [2020-06-13] Added additional entry to server ping for network speed by [@lflare]. ### Changed - [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare]. diff --git a/src/main/java/mdnet/base/ServerHandler.java b/src/main/java/mdnet/base/ServerHandler.java index a639bde..da00cca 100644 --- a/src/main/java/mdnet/base/ServerHandler.java +++ b/src/main/java/mdnet/base/ServerHandler.java @@ -42,6 +42,7 @@ public class ServerHandler { params.put("secret", settings.getClientSecret()); params.put("port", settings.getClientPort()); params.put("disk_space", settings.getMaxCacheSizeMib() * 1024 * 1024 /* MiB to bytes */); + params.put("network_speed", settings.getMaxBurstRateKibPerSecond() * 1024 /*KiB to bytes */); params.put("build_version", Constants.CLIENT_BUILD); HttpResponse response = Unirest.post(SERVER_ADDRESS + "ping")