@bobfrankston/rmfmail 1.1.193 → 1.1.195

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.
@@ -651,7 +651,19 @@ export class ImapManager extends EventEmitter {
651
651
  const config = this.configs.get(accountId);
652
652
  if (!config) throw new Error(`No config for account ${accountId}`);
653
653
  const host = config.server || accountId;
654
- const releaseHostSlot = await this.acquireHostSlot(host);
654
+ // IDLE bypasses the host semaphore. The semaphore caps concurrent
655
+ // connection OPENS so a multi-account-on-one-host setup can't blow the
656
+ // server's connection limit — but IDLE is a SINGLE long-lived socket
657
+ // per account (the subscription), established once and parked. Gating
658
+ // it behind the same 4 permits that sync/prefetch/fast churn through
659
+ // meant that when sync saturated the pool (folders timing out at 360s),
660
+ // IDLE could not get a slot to (re)subscribe — so new mail stopped
661
+ // arriving by push and the user fell back to slow polling (Bob
662
+ // 2026-05-29: "you should be subscribed and not depend on sync"). The
663
+ // subscription must NEVER be starved by sync. One extra socket per
664
+ // account is well within any server cap.
665
+ const skipSemaphore = purpose === "idle";
666
+ const releaseHostSlot = skipSemaphore ? (() => { /* no semaphore for IDLE */ }) : await this.acquireHostSlot(host);
655
667
  let client: any;
656
668
  try {
657
669
  // Verbose IMAP wire trace for ops connections only — that's the
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bobfrankston/mailx-imap",
9
- "version": "0.1.74",
9
+ "version": "0.1.75",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/iflow-direct": "^0.1.27",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",