Skip to content

Commit

Permalink
Merge pull request #19 from mondwan/fix_window_unreachable
Browse files Browse the repository at this point in the history
Catch keyword TTL instead of round-trip time
  • Loading branch information
danielzzz committed Nov 7, 2014
2 parents 5c92c97 + f5f69ab commit 0def551
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ping-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function probe(addr, config) {
// this is my solution on Chinese Windows8 64bit
result = false;
for (var t = 0; t < lines.length; t++) {
if (lines[t].indexOf('round trip time') > 0) {
if (lines[t].search(/TTL=[0-9]+/i) > 0) {
result = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ping-sys.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function probe(addr, cb) {
var lines = outstring.split('\n');
result = false;
for (var t = 0; t < lines.length; t++) {
if (lines[t].indexOf('round trip time') > 0) {
if (lines[t].search(/TTL=[0-9]+/i) > 0) {
result = true;
break;
}
Expand Down

2 comments on commit 0def551

@GermanBluefox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm publish ??
To update npm.

@danielzzz
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, it's published now, thanks!

Please sign in to comment.