Drop the try catches, this might make it a bit unstable until we work out some bugs.

This commit is contained in:
Cryptkeeper 2015-11-25 19:29:00 -06:00
parent 0150e3b30e
commit 82752767b9

@ -7,8 +7,6 @@ var util = require('./util');
function pingMinecraftPC(host, port, timeout, callback) {
var startTime = util.getCurrentTimeMs();
// Try catch incase the down stream module is bad at handling exceptions.
try {
mcpc_ping(host, port, function(err, res) {
if (err) {
callback(err, null);
@ -25,17 +23,12 @@ function pingMinecraftPC(host, port, timeout, callback) {
});
}
}, timeout);
} catch (err) {
callback(err, null);
}
}
// This is a wrapper function for mcpe-ping, mainly used to convert the data structure of the result.
function pingMinecraftPE(host, port, timeout, callback) {
var startTime = util.getCurrentTimeMs();
// Try catch incase the down stream module is bad at handling exceptions.
try {
mcpe_ping(host, port || 19132, function(err, res) {
if (err) {
callback(err, null);
@ -51,9 +44,6 @@ function pingMinecraftPE(host, port, timeout, callback) {
});
}
}, timeout);
} catch (err) {
callback(err, null);
}
}
exports.ping = function(host, port, type, timeout, callback) {