Updated reset-timeout limit
This commit is contained in:
parent
3cc162a2a4
commit
1690815bd9
|
|
@ -5,14 +5,10 @@ plugins {
|
|||
}
|
||||
|
||||
group = "org.adde0109"
|
||||
version = "1.3.1-beta-rc3"
|
||||
version = "1.3.1-beta-rc4"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "papermc"
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ public class AmbassadorConfig {
|
|||
};
|
||||
|
||||
public void validate() {
|
||||
final int connectionTimeout = Ambassador.getInstance().server.getConfiguration().getConnectTimeout();
|
||||
if (resetTimeout > connectionTimeout) {
|
||||
throw new InvalidValueException("'reset-timeout' can't be more than to 'connection-timeout': reset-timeout=" + resetTimeout + " connection-timeout=" + connectionTimeout);
|
||||
final int connectionTimeout = Ambassador.getInstance().server.getConfiguration().getReadTimeout();
|
||||
if (resetTimeout >= connectionTimeout) {
|
||||
throw new InvalidValueException("'reset-timeout' can't be more than nor equal to 'read-timeout': reset-timeout=" + resetTimeout + " connection-timeout=" + connectionTimeout);
|
||||
}
|
||||
if (resetTimeout <= 0) {
|
||||
throw new InvalidValueException("'reset-timeout' can't be less than nor equal to zero: reset-timeout=" + resetTimeout);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
config-version = "1.1"
|
||||
|
||||
# How long to wait for the client to reset before disconnecting (In milliseconds)
|
||||
reset-timeout = 1000
|
||||
reset-timeout = 3000
|
||||
# Message displayed to the player when disconnected from proxy during server switch.
|
||||
# Legacy color codes and JSON are accepted.
|
||||
disconnect-reset-message = "&6Please reconnect"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user