@mongodb-js/ssh-tunnel
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -90,8 +90,12 @@ "use strict"; | ||
const serverClose = util_1.promisify(this.server.close.bind(this.server)); | ||
try { | ||
await serverClose(); | ||
const [maybeError] = await Promise.all([ | ||
// If we catch anything, just return the error instead of throwing, we | ||
// want to await on closing the connections before re-throwing server | ||
// close error | ||
serverClose().catch((e) => e), | ||
this.closeOpenConnections(), | ||
]); | ||
if (maybeError) { | ||
throw maybeError; | ||
} | ||
finally { | ||
await this.closeOpenConnections(); | ||
} | ||
} | ||
@@ -98,0 +102,0 @@ async closeOpenConnections() { |
{ | ||
"name": "@mongodb-js/ssh-tunnel", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Yet another ssh tunnel based on ssh2", | ||
@@ -41,2 +41,3 @@ "main": "lib/index.js", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.2.1", | ||
"ts-jest": "^26.5.1", | ||
@@ -43,0 +44,0 @@ "typescript": "^4.1.5" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16933
139
150
12