tangerine 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +16 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1146,8 +1146,8 @@ class Tangerine extends dns.promises.Resolver {
|
|
|
1146
1146
|
// <https://github.com/nodejs/undici/issues/3353>
|
|
1147
1147
|
// eslint-disable-next-line no-await-in-loop, max-depth
|
|
1148
1148
|
if (body && typeof body.dump === 'function') await body.dump();
|
|
1149
|
-
//
|
|
1150
|
-
if (!abortController.signal.aborted) abortController.abort();
|
|
1149
|
+
// NOTE: we don't need to do this (causes uncaught exception)
|
|
1150
|
+
// if (!abortController.signal.aborted) abortController.abort();
|
|
1151
1151
|
break;
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
@@ -1231,7 +1231,8 @@ class Tangerine extends dns.promises.Resolver {
|
|
|
1231
1231
|
// https://github.com/mafintosh/dns-packet/issues/72
|
|
1232
1232
|
return packet.decode(buffer);
|
|
1233
1233
|
} catch (_err) {
|
|
1234
|
-
|
|
1234
|
+
// NOTE: we don't need to do this (causes uncaught exception)
|
|
1235
|
+
// if (!abortController.signal.aborted) abortController.abort();
|
|
1235
1236
|
debug(_err, { name, rrtype, ecsSubnet });
|
|
1236
1237
|
if (this.options.returnHTTPErrors) throw _err;
|
|
1237
1238
|
const err = this.constructor.createError(
|
|
@@ -1255,7 +1256,13 @@ class Tangerine extends dns.promises.Resolver {
|
|
|
1255
1256
|
// (instead they are called with "ABORT_ERR"; see ABORT_ERROR_CODES)
|
|
1256
1257
|
cancel() {
|
|
1257
1258
|
for (const abortController of this.abortControllers) {
|
|
1258
|
-
if (!abortController.signal.aborted)
|
|
1259
|
+
if (!abortController.signal.aborted) {
|
|
1260
|
+
try {
|
|
1261
|
+
abortController.abort();
|
|
1262
|
+
} catch (err) {
|
|
1263
|
+
this.options.logger.debug(err);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1259
1266
|
}
|
|
1260
1267
|
}
|
|
1261
1268
|
|
|
@@ -1273,7 +1280,11 @@ class Tangerine extends dns.promises.Resolver {
|
|
|
1273
1280
|
parentAbortController.signal.addEventListener(
|
|
1274
1281
|
'abort',
|
|
1275
1282
|
() => {
|
|
1276
|
-
|
|
1283
|
+
try {
|
|
1284
|
+
abortController.abort();
|
|
1285
|
+
} catch (err) {
|
|
1286
|
+
this.options.logger.debug(err);
|
|
1287
|
+
}
|
|
1277
1288
|
},
|
|
1278
1289
|
{ once: true }
|
|
1279
1290
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tangerine",
|
|
3
3
|
"description": "Tangerine is the best Node.js drop-in replacement for dns.promises.Resolver using DNS over HTTPS (\"DoH\") via undici with built-in retries, timeouts, smart server rotation, AbortControllers, and caching support for multiple backends (with TTL and purge support).",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.7",
|
|
5
5
|
"author": "Forward Email (https://forwardemail.net)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/forwardemail/nodejs-dns-over-https-tangerine/issues"
|