imapflow 1.2.11 → 1.2.12

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.2.11"
2
+ ".": "1.2.12"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.12](https://github.com/postalsys/imapflow/compare/v1.2.11...v1.2.12) (2026-03-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * prevent unhandled NoConnection rejection in IDLE recovery ([e177372](https://github.com/postalsys/imapflow/commit/e17737296b6b2de9ba25392b79542cf6d7d45826))
9
+
3
10
  ## [1.2.11](https://github.com/postalsys/imapflow/compare/v1.2.10...v1.2.11) (2026-03-03)
4
11
 
5
12
 
package/lib/imap-flow.js CHANGED
@@ -856,7 +856,12 @@ class ImapFlow extends EventEmitter {
856
856
  // Attempt to recover IDLE connections
857
857
  this.run('NOOP')
858
858
  .then(() => this.idle())
859
- .catch(this._socketError); // Natural circuit breaker
859
+ .catch(err => {
860
+ this.log.warn({ msg: 'IDLE recovery failed after timeout', err, cid: this.id });
861
+ if (!this.isClosed) {
862
+ this.close();
863
+ }
864
+ });
860
865
  } else {
861
866
  // Close immediately for non-IDLE operations
862
867
  this.log.debug({ msg: 'Socket timeout', cid: this.id });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "IMAP Client for Node",
5
5
  "main": "lib/imap-flow.js",
6
6
  "types": "lib/imap-flow.d.ts",