fix: remove deno hacky fixes (#452)

* fix: remove deno hacky fixes

* fix: upgrade deno workflow from 1.x to 1.39.2
This commit is contained in:
CosminPerRam 2024-01-06 15:46:02 +02:00 committed by GitHub
parent 90b3c6044b
commit 6e6d140b7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 16 deletions

View file

@ -68,21 +68,13 @@ export default class QueryRunner {
for (const attempt of attempts) {
for (let retry = 0; retry < numRetries; retry++) {
attemptNum++
let result
try {
result = await this._attempt(attempt)
return await this._attempt(attempt)
} catch (e) {
e.stack = 'Attempt #' + attemptNum + ' - Port=' + attempt.port + ' Retry=' + (retry) + ':\n' + e.stack
errors.push(e)
} finally {
// Deno doesn't support unref, so we must close the socket after every connection
// https://github.com/denoland/deno/issues/20138
if (typeof Deno !== 'undefined') {
this.udpSocket?.socket?.close()
delete this.udpSocket
}
}
if (result) return result
}
}