Bring discord protocol up to date with gamedig 3.0

This commit is contained in:
Michael Morrison 2021-05-18 22:33:36 -05:00
parent d9310db38b
commit fe124a4487
6 changed files with 43 additions and 29 deletions

View file

@ -146,7 +146,10 @@ class Core extends EventEmitter {
}
assertValidPort(port) {
if (!port || port < 1 || port > 65535) {
if (!port) {
throw new Error("Could not determine port to query. Did you provide a port?");
}
if (port < 1 || port > 65535) {
throw new Error("Invalid tcp/ip port: " + port);
}
}