misc.mcserver: add error event to connection and hopefully it stops crashes
This commit is contained in:
parent
c6083ea062
commit
e5f4df6333
1 changed files with 4 additions and 0 deletions
|
@ -149,6 +149,10 @@ function queryServer(ip, port, HANDSHAKE_PACKET) {
|
|||
}
|
||||
});
|
||||
client.on("timeout", function () {});
|
||||
client.on("error", function (err) {
|
||||
logger.verbose("mcserver", "failed:", err);
|
||||
resolve({error: err});
|
||||
});
|
||||
} catch (err) {
|
||||
logger.verbose("mcserver", "failed:", err);
|
||||
resolve({error: err});
|
||||
|
|
Loading…
Reference in a new issue