Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
🐛 Fix mod_netstat not recovering from offline state
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Jan 28, 2019
1 parent bdd152b commit 3262679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/classes/netstat.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Netstat {
</div>`;

this.offline = false;
this.lastconn = {_ended: true};
this.lastconn = {finished: true};
this.iface = null;

this._httpsAgent = new require("https").Agent({
Expand Down Expand Up @@ -85,7 +85,7 @@ class Netstat {
if (net.ip4 === "127.0.0.1") {
offline = true;
} else {
if (this.lastconn._ended) {
if (this.lastconn.finished) {
this.lastconn = require("https").get({host: "ipinfo.now.sh", port: 443, path: "/", localAddress: net.ip4, agent: this._httpsAgent}, (res) => {
let rawData = "";
res.on("data", (chunk) => {
Expand Down

0 comments on commit 3262679

Please sign in to comment.