Skip to content

Commit

Permalink
gracefully handle pocketmine not responding to mcquery
Browse files Browse the repository at this point in the history
  • Loading branch information
hexparrot committed Feb 23, 2016
1 parent 1a33016 commit 89d5f4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mineos.js
Original file line number Diff line number Diff line change
Expand Up @@ -1513,12 +1513,14 @@ mineos.mc = function(server_name, base_dir) {
cb();
},
function(cb) {
q.connect(function(err){
try {
q.connect(function(err){
if (err || !q.online)
cb(err);
else
q.full_stat(cb);
});
});
} catch (e) { cb(true) }
},
function(pingback, cb) {
retval = pingback;
Expand Down

0 comments on commit 89d5f4d

Please sign in to comment.