Compare commits

..

No commits in common. "7cd3444a4ff6bf48afcf891ceeb2787055c6dd1d" and "72041aa3f973ea34687d883070c16837fb901dc2" have entirely different histories.

1 changed files with 4 additions and 4 deletions

View File

@ -132,7 +132,7 @@ function ping(host, port = 19132, cb, timeout = 5000) {
// Close the socket and clear the timeout task // Close the socket and clear the timeout task
// This is a general cleanup for success conditions // This is a general cleanup for success conditions
closeSocket(); closeSocket();
cb(clientData, null); cb(null, clientData);
break; break;
} }
@ -160,9 +160,9 @@ export function pingBedrock(host, options = {}) {
const { port = 19132, timeout = 5000 } = options; const { port = 19132, timeout = 5000 } = options;
return new Promise((resolve, reject) => { return new Promise((resilve, reject) => {
ping(host, port, (res, err) => { ping(host, port, (err, res) => {
err ? reject(err) : resolve(res); err ? reject(err) : resilve(res);
}, timeout); }, timeout);
}); });
} }