mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-24 07:14:04 +00:00
log undefined ping
This commit is contained in:
parent
764160f38c
commit
3227a2660b
1 changed files with 17 additions and 12 deletions
|
@ -7,6 +7,7 @@ const spawn = require("child_process").spawn,
|
|||
WIN = /^win/.test(process.platform),
|
||||
LIN = /^linux/.test(process.platform),
|
||||
MAC = /^darwin/.test(process.platform);
|
||||
const { debug } = require("../src/util");
|
||||
|
||||
module.exports = Ping;
|
||||
|
||||
|
@ -121,6 +122,10 @@ Ping.prototype.send = function(callback) {
|
|||
ms = stdout.match(self._regmatch); // parse out the ##ms response
|
||||
ms = (ms && ms[1]) ? Number(ms[1]) : ms;
|
||||
|
||||
if (! ms) {
|
||||
debug(stdout)
|
||||
}
|
||||
|
||||
callback(null, ms, stdout);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue