Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
fix(vpn): close session after read
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Feb 6, 2024
1 parent ab92379 commit 47c9a32
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
},
"dependencies": {
"cheerio": "1.0.0-rc.12",
"fortigate-web-sslvpn": "^1.1.0"
"fortigate-web-sslvpn": "^1.2.0"
}
}
3 changes: 3 additions & 0 deletions packages/library/src/fetcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export const readSignaturesPageFromWebVPN = async (username: string, password: s
encoding: "latin1"
});

// Close the session since we don't need it anymore.
await vpn.close();

if (response.status !== 200) {
throw new Error("An error occurred while fetching the signatures page.");
}
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 47c9a32

Please sign in to comment.