Skip to content

Commit

Permalink
Improved ping check times
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackyliang committed Sep 11, 2024
1 parent a306c82 commit 82b397c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pfsense-actions",
"displayName": "pfSense® Actions",
"version": "1.1.0",
"version": "1.1.1",
"description": "A controller that allows a network administrator to run simple actions such as Wake-on-LAN and reload firewall filters",
"main": "./build/index.js",
"exports": "./build/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ class Server {

await instance.login();

// Pings the device 3 times (5 tries each) until it gives up.
for (let i = 1; i <= 3; i += 1) {
const pingResponse = await instance.ping(ipAddress, 5);
// Pings the device 10 times (2 tries each) until it gives up.
for (let i = 1; i <= 10; i += 1) {
const pingResponse = await instance.ping(ipAddress, 2);

console.log(JSON.stringify(pingResponse));

Expand Down

0 comments on commit 82b397c

Please sign in to comment.