mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
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:
parent
90b3c6044b
commit
6e6d140b7a
5 changed files with 6 additions and 16 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue