mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Fixed conversion mistake
This commit is contained in:
parent
46e5cf23f8
commit
094347f1c6
|
@ -42,7 +42,7 @@ public class ServerHandler {
|
|||
params.put("secret", settings.getClientSecret());
|
||||
params.put("port", settings.getClientPort());
|
||||
params.put("disk_space", settings.getMaxCacheSizeInMebibytes() * 1024 * 1024 /* MiB to bytes */);
|
||||
params.put("network_speed", settings.getMaxKilobitsPerSecond() * 1000 * 8 /* Kbps to bytes */);
|
||||
params.put("network_speed", settings.getMaxKilobitsPerSecond() * 1000 / 8 /* Kbps to bytes */);
|
||||
params.put("build_version", Constants.CLIENT_BUILD);
|
||||
|
||||
HttpResponse<ServerSettings> response = Unirest.post(SERVER_ADDRESS + "ping")
|
||||
|
@ -66,7 +66,7 @@ public class ServerHandler {
|
|||
params.put("secret", settings.getClientSecret());
|
||||
params.put("port", settings.getClientPort());
|
||||
params.put("disk_space", settings.getMaxCacheSizeInMebibytes() * 1024 * 1024 /* MiB to bytes */);
|
||||
params.put("network_speed", settings.getMaxKilobitsPerSecond() * 1000 * 8 /* Kbps to bytes */);
|
||||
params.put("network_speed", settings.getMaxKilobitsPerSecond() * 1000 / 8 /* Kbps to bytes */);
|
||||
params.put("build_version", Constants.CLIENT_BUILD);
|
||||
params.put("tls_created_at", old.getTls().getCreatedAt());
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class Netty(private val tls: ServerSettings.TlsCert, private val clientSettings:
|
|||
private lateinit var address: InetSocketAddress
|
||||
|
||||
private val burstLimiter = object : GlobalTrafficShapingHandler(
|
||||
workerGroup, clientSettings.maxKilobitsPerSecond * 1000L, 0, 50) {
|
||||
workerGroup, clientSettings.maxKilobitsPerSecond * 1000L / 8L, 0, 50) {
|
||||
override fun doAccounting(counter: TrafficCounter) {
|
||||
statistics.getAndUpdate {
|
||||
it.copy(bytesSent = it.bytesSent + counter.cumulativeWrittenBytes())
|
||||
|
|
Loading…
Reference in a new issue