Skip to content

Commit

Permalink
Changed ping async call to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardonunesdev committed Jul 29, 2017
1 parent fe51da5 commit fb29f0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function pingDomain(domain) {
return new Promise((resolve, reject) => {
dns.lookup(domain, (error, ip, family) => {
if (error) { return reject(error); }
ping.promise.probe(ip, (isAlive) => {
ping.sys.probe(ip, (isAlive) => {
console.log(domain+' - '+ip+' - '+(isAlive ? 'up' : 'down'));
return resolve();
});
Expand Down

0 comments on commit fb29f0f

Please sign in to comment.