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