@bobfrankston/mailx-imap 0.1.93 → 0.1.94
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 +15 -0
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -3439,6 +3439,21 @@ export class ImapManager extends EventEmitter {
|
|
|
3439
3439
|
console.error(` [prefetch] ${accountId} folder ${folder.path} chunk ${chunkStart / PREFETCH_CHUNK_SIZE}: batch fetch failed: ${msg}`);
|
|
3440
3440
|
counters.errors++;
|
|
3441
3441
|
this.recordFolderError(accountId, folder.path);
|
|
3442
|
+
// A dead connection / network outage won't heal
|
|
3443
|
+
// mid-run — every further chunk just re-fails on the
|
|
3444
|
+
// same dead socket and burns the error budget (Bob
|
|
3445
|
+
// 2026-06-13: prefetch "Not connected" thrash on a
|
|
3446
|
+
// flaky network). Stop this folder's remaining chunks
|
|
3447
|
+
// NOW; the next reconciler tick reconnects fresh.
|
|
3448
|
+
// These are transient, so the UIDs are NOT backed off
|
|
3449
|
+
// (markPrefetchEmpty is per-message poison only) —
|
|
3450
|
+
// they retry next tick. Genuine per-body errors are
|
|
3451
|
+
// handled per-UID above and never reach here.
|
|
3452
|
+
const dead = /not connected|ETIMEDOUT|ECONNRESET|ECONNREFUSED|EPIPE|socket|connection (closed|reset|lost)|disconnect/i.test(msg);
|
|
3453
|
+
if (dead) {
|
|
3454
|
+
console.log(` [prefetch] ${accountId}/${folder.path}: connection down — deferring rest to next tick`);
|
|
3455
|
+
break;
|
|
3456
|
+
}
|
|
3442
3457
|
if (counters.errors >= ERROR_BUDGET)
|
|
3443
3458
|
break;
|
|
3444
3459
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/mailx-imap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@bobfrankston/mailx-types": "^0.1.19",
|
|
13
13
|
"@bobfrankston/mailx-settings": "^0.1.26",
|
|
14
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
14
|
+
"@bobfrankston/mailx-store": "^0.1.49",
|
|
15
15
|
"@bobfrankston/iflow-direct": "^0.1.53",
|
|
16
16
|
"@bobfrankston/tcp-transport": "^0.1.7",
|
|
17
17
|
"@bobfrankston/smtp-direct": "^0.1.9",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bobfrankston/mailx-types": "^0.1.19",
|
|
41
41
|
"@bobfrankston/mailx-settings": "^0.1.26",
|
|
42
|
-
"@bobfrankston/mailx-store": "^0.1.
|
|
42
|
+
"@bobfrankston/mailx-store": "^0.1.49",
|
|
43
43
|
"@bobfrankston/iflow-direct": "^0.1.53",
|
|
44
44
|
"@bobfrankston/tcp-transport": "^0.1.7",
|
|
45
45
|
"@bobfrankston/smtp-direct": "^0.1.9",
|